This is the hardest CSS Battle I've tried

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 174

  • @chrisbolson
    @chrisbolson Рік тому +77

    I must admit that I quite enjoy watching you struggle through these cssbattle challenges - I'm sure the stress of doing them "live" makes them a lot harder than they actually are.

    • @rockokaine3186
      @rockokaine3186 Рік тому +18

      Knowing how knowledgeable he is I find his struggles to complete some of these comforting

  • @iamavegetable1936
    @iamavegetable1936 Рік тому +14

    It's useless to scream at my screen to helps you :) Thanks you to share this with us. I have fun with CSSBattle today ! BORDER-BOTTOM:NONE!!!

  • @simonjohn7259
    @simonjohn7259 Рік тому +28

    Challenge 4 - The leaf shapes are actually just squares with border radius on opposite corners. Just rotate them.

  • @zaidyt8565
    @zaidyt8565 Рік тому +2

    cool content man😎 keep the css battle series alive. can learn a lot of things from this🤯

  • @CodeCraftStudio
    @CodeCraftStudio Рік тому +2

    man I enjoyed a lot watching you struggle. Just made me a bit sane though, if you are struggling, then its ok for me to struggle. 😂

  • @AnmAtAnm
    @AnmAtAnm Рік тому +75

    It was painful to see you struggle with the triangle after you had half the triangle at 9:50 and the other half at 10:09.

    • @hussein-alemam
      @hussein-alemam Рік тому +2

      agreeee

    • @adamisonfiree
      @adamisonfiree Рік тому +4

      These videos are so awesome, I'm learning CSS and I saw that and i was like BLACK BLACK!

    • @GabrielMolterIO
      @GabrielMolterIO Рік тому +1

      Scrolled down here to look for this comment and it was the first one I saw 😅

  • @mellowmarvin
    @mellowmarvin Рік тому +1

    What a great Video! As always :) Thank you!

  • @clevermissfox
    @clevermissfox Рік тому +11

    It is encouraging to see in these battles all the guys also make silly errors like mispelling classes, missing spaces, commas, and turning semicolons into colons or vice versa. It makes me feel like less of a dingbat 😂

  • @NenadoDyadya6
    @NenadoDyadya6 Рік тому +3

    Kevin the last one was really amazing i really love your work. Man you are legend of CSS

  • @d47im5e
    @d47im5e Рік тому

    For a 5 year fireworks/photoshop to html slicer in my youth, i really enjoyed the last one, it made me talk with the screen, screaming and giving you the correct instruction as you do it(like a senior telling the answer of a question in a show)😊last one could be a separate video! Thank you and keep it up!

  • @cristianzwierzynski1305
    @cristianzwierzynski1305 Рік тому +1

    Thats the definition of resilient job. I watch every video that You made. Love to learn how You aproach to the task from different views and that is awesome Excuse My English, it's not my language. Cheers from argentina.

  • @stbausms
    @stbausms Рік тому

    Wow... I'm learning so much with every video. It's entertaining and informative at the same time! I'm watching more and more videos of you and discovered cssbattle for me to learn it the hard way. I guess I learnt more the last two weeks since I started watching it than the 5 years before.
    Great great work!!

  • @CristianKirk
    @CristianKirk Рік тому +7

    The #137 (Elbow) only needs a single div and a pseudoelement. You got really tangled up with that one! It's just a box on top of another.

    • @youtubeforcinghandlessucks
      @youtubeforcinghandlessucks Рік тому

      no pseudo element, could just set border-bottom and border-right to 0px

    • @axelkarlsson6580
      @axelkarlsson6580 Рік тому

      Can also be done with one div and border on top and left only

    • @HenriqueErzinger
      @HenriqueErzinger 5 місяців тому

      @@axelkarlsson6580nope, for the same reason the triangle thing works. The junction between borders is a diagonal.

  • @JulianColeman03
    @JulianColeman03 Рік тому +7

    I will never not hear "Hello my friend and friend". This challenge was nuts! Lots of good learnings

    • @lifeisfakenews
      @lifeisfakenews Рік тому +4

      SAME i only recently realised he was saying front end friends not friend and friends

    • @clevermissfox
      @clevermissfox Рік тому +1

      Same, thought it was friemd and friends 😂

  • @MichaelJones-us9ty
    @MichaelJones-us9ty Рік тому

    I am very new but my first thought on the spiral was to make a million dots and just position them all around, but i learned a lot watching you. Love watching these you help me a lot. I like how you teach as you are doing these as well. thank you

  • @oruaromukoro5072
    @oruaromukoro5072 Рік тому +79

    Couldn’t you have done border: black transparent transparent black; for the second challenge

    • @KevalMiistry
      @KevalMiistry Рік тому +46

      Nice noticing but it will be: black black transparent transparent

    • @fraaank
      @fraaank Рік тому +37

      @@KevalMiistry I was shouting this at the screen. 🙂

    • @KevalMiistry
      @KevalMiistry Рік тому +9

      @@fraaank Honestly Mee too man! 😭
      I was like how the hell this person The Kevin Powel can't see what I'm seeing

    • @royhyde8842
      @royhyde8842 Рік тому +1

      @@fraaank hahahaha Same...

    • @UPLYNXED
      @UPLYNXED Рік тому +2

      You can use #0000 for transparent fyi

  • @NathanHedglin
    @NathanHedglin Рік тому +2

    Love it! I was just showing my students the spiral one

  • @pintokatendejonathan1740
    @pintokatendejonathan1740 Рік тому

    I'm so happy to watch more and more your tutorials, and I love the way that you think for founding solution.

  • @adamuk73
    @adamuk73 Рік тому +6

    You know it's a toughie when KP has frazzled hair at the end.

  • @jfftck
    @jfftck Рік тому +4

    The spiral can be made using box-shadow and a lot of them, that would allow for a single div to draw it.

  • @_abdul
    @_abdul Рік тому +2

    1:02:20 That Imposter Syndrome Kicking In.

  • @edwinandrescollazos4258
    @edwinandrescollazos4258 Рік тому +1

    I love CSS battle videos!!

  • @julesfadel
    @julesfadel 5 місяців тому

    man i've been watching most of your videos of challenges, and you're a genius! but that challenge #4, i don't know what was going with you! i'm still new to this field, but as i was watching it i don't know how you couldn't see how simple that was! you just make a square with background white, and then "border-radius: 0 100px;" and you have the element in white! 🤣 had to go to the challenge and do to make sure i did it right, and kept thinking how couldn't he think of that?!!
    I know after one year if you watch this clip you'll have a good laugh of this.. just sometimes in this field.. we overthink ourselves and the solution is kind of easy😁

  • @Im-mustafa-saeed
    @Im-mustafa-saeed Рік тому +3

    well for challenge 4, imagine the shape of a venn diagram with two circles. where one circle is a parent element which has the { overflow: hidden; } . and the second circle is it's child element which has the background color you want, the intersection area should give you the desired shape

  • @elmalleable
    @elmalleable Рік тому +1

    target 22 just a cheeky tip, use .outer .inner and styly inner to get one leg, refect it once to get 2 legs, then reflect outer to get all 4 legs

  • @UtterNonsenseBuilds
    @UtterNonsenseBuilds 11 місяців тому

    New to the channel. Love the content!

  • @AThousandTales
    @AThousandTales Рік тому +16

    For the spiral challenge, I used clip-path:polygon(0px 0px, 0px 50%, 100% 50%, 100% 0%); instead of a pseudo-element.

    • @alekz112
      @alekz112 Рік тому +1

      Real ones use clip-path: path()

  • @Queue88
    @Queue88 Рік тому +1

    Challenge 4: two TIL doing this challenge: box-reflect can be a neat tool for things that are in any way mirrored, like the two brown ones. What I did was: width: 100px, height: 100px; border-radius: 0 100px; -webkit-box-reflect: right 0; then position it right for the browns. For the white one i did the same, but without reflection and rotated around 45deg. Still this would never be possible without everything i learned from you.

  • @ColeNOXyd2nd
    @ColeNOXyd2nd Рік тому +4

    #138
    can easily be done with corner radius on 2 corners x 3, rotate the white one

  • @nbot3000
    @nbot3000 Рік тому +1

    The last spiral puzzle best solution takes 160 symbols, and im interested in viewing that code (im free user at the moment, so i cant). For me its not a problem to get 100% identity for any puzzle, the most value is code shortness. I have 600-720 points avg, but top solutions scored by 800+ and at the same time the avg puzzle score is 500-550.
    I learn some top solutions and i found they very hacky. High score solutions are NO using divs, position, etc.. they using scss, style attributes inside html nodes and so much more very interested combinations.
    Its nice place to learn or improve skills. Thank you to discover that space for me.

  • @jfftck
    @jfftck Рік тому +4

    The other tip for these is to have a border of 0 or none for the side you don’t want instead of adding a pseudo element to cover it.

  • @grugbrain
    @grugbrain Рік тому +3

    This is both painful and amazing.

  • @fagol1236
    @fagol1236 Рік тому +3

    23:33 you could have done the #elbow challenge with just 2 divs and tweaking the border radius for four corners

    • @prafuldeoghare1904
      @prafuldeoghare1904 Рік тому

      maybe with a one div. we can pseudo element like :before and :after.

  • @johnwarren7722
    @johnwarren7722 Рік тому

    Kevin, I noticed you had a bit of trouble with the shape in the Lotus test. It can be done easily in 6 lines of code.
    .leaf{
    height: 8rem;
    width: 8rem;
    background-color: teal;
    border-top-left-radius: 8rem;
    border-bottom-right-radius: 8rem;
    transform: rotate(-45deg);
    }
    Hope this is useful.
    Love watching your videos and I have learnt so much from them. Cheers John

  • @markthepianist6577
    @markthepianist6577 Рік тому +1

    There was a cleaner and hackier way to do the elbow
    Container div with overflow hidden + enormous rounded rectangle :)

  • @BunkerD
    @BunkerD Рік тому +1

    For the second one, you could have just done 4 for white rectangles rounded on the middle side (flat toward the outsiders), then cover with a div superposed to the container with "border: transparent pink" (to create two side triangles hiding the white in excess).

  • @chrisbolson
    @chrisbolson Рік тому +1

    The lampshade could be achieved by using transparent borders and adjusting the bottom border with and color something like this:
    width:100px;
    border:60px solid transparent;
    border-bottom:200px solid pink;

  • @JlHAD
    @JlHAD Рік тому +3

    44:10 for the fourth challenge you can get the results with:
    border-radius: 100% 0;
    rotate: -45deg;

  • @nekocari
    @nekocari Рік тому +1

    I had an idea for the lotus one after seeing you use rotate. My approach was using border- radius : 100% 0; on the div. Turned out a 100% match with less than 420 characters used.

  • @commanderkruge
    @commanderkruge Рік тому

    Oooooooh - I never would have thought to use borders as the base for triangles! GREAT little trick. :D I'd have tried the four white "drops" with four divs with one round side and then "substract" 2 squares in red that are rotated 45°. :)

  • @Pixcellworld
    @Pixcellworld Рік тому +1

    For the 44:28 you should of done it with squares. Giving diagonal corners a radius of 100% then rotating it.

  • @craig7520
    @craig7520 Рік тому +1

    I'd love to see an episode of this where you do an unoptimised solution speedrun

  • @andradegilmar
    @andradegilmar Рік тому +1

    This spiral was crazy!

  • @Acaykath
    @Acaykath Рік тому +1

    Watching you do lotus and missing the easy solution... Big transparent circle with overflow hidden. White circle inside offset to the left or right to get the pointy ended oval. Repeat for other two petals with different colour inside circle and offset direction... in fact for the brown petals you can use the same transparent circle container.

  • @BlockCylinder
    @BlockCylinder Рік тому +1

    I did that cinnamon bun spiral with a bunch of semicircular divs, defining the border radius in pixels rather than %. I think it took me about a half hour, too, and I only got a 99.5% match.

  • @deatho0ne587
    @deatho0ne587 Рік тому +2

    49:01 I have never done clip-path, but would guess something like (25px 0px, 0px 25px, 0px 0px, 0px 0px), with some of the 0px being 100%
    For the last it looks like a line, na the last one is 2 dots with 3 border-radius on larger circles

  • @d.l.3807
    @d.l.3807 Рік тому +1

    Challenge 4:
    3 divs that take in: width: 100, height 100, border-radius: 100% 0;
    Then you have the shapes. Position them nicely and done. :)

    • @MsAnnieHuang
      @MsAnnieHuang Рік тому +1

      Thank you Wiz for giving the exact solution. A lot of people describe what to do but I got confused. Your answer is much more clear.

  • @ChrisMochinskiMusic
    @ChrisMochinskiMusic Рік тому +2

    You should TOTALLY accept challengers for these occasionally. Solid, simple content opportunity! Vet a few projects to make sure things align, and take ‘em on. Think about it! I’d love to get my butt kicked by you at one of these (though I do OCCASIONALLY) find myself a step ahead of you as I’m following along…but hey, easier said than done!).

  • @casesensitive9744
    @casesensitive9744 Рік тому +2

    I got the solution at 1hr 7s based on your ideas. Making it more rectangular then using pixels to define they border radius. I still don't know what you final solution will be at this point.

  • @toddcamnitz6164
    @toddcamnitz6164 2 місяці тому

    For half circles on spiral:
    Border-radius: 50%;
    Border-top: 20px solid orange;
    Border-right: 20px solid orange;
    Border-left: 20px transparent;
    Border-bottom: 20px transparent;
    Transform: rotate(x deg)

  • @haliszekeriyaozkok4851
    @haliszekeriyaozkok4851 Рік тому

    This guy because of that King Of Css. You're definitely a Css legend already.

  • @catalinbanici3357
    @catalinbanici3357 Рік тому +1

    For the second challenge could it worked like 2 square divs rotated 45 deg with the same color as background?
    For the fourth elbow challenge, maybe 2 rectangle divs one smaller than the other in a flex container, justify content and align items end, position absolute with border top left radius ..? 🤔

  • @Memer09157
    @Memer09157 9 місяців тому

    In challenge no. 7 sprial if you see, those are just half circles, but some is up facing and some are down face or rotated.
    Love your videos..

  • @fagol1236
    @fagol1236 Рік тому +1

    10:00 border: black black transparent transparent;
    I was screaming😭😭

  • @dirkczaja7227
    @dirkczaja7227 Рік тому +1

    What about alternating box shadows in two containers with overflow hidden for the last challenge...? Because upper and lower half are both concentric half circles... Would be quite similar to your solution but with only 2 divs and 2 dots... Didn't try it yet... and maybe didn't think it to the end... but worth a shot I guess

  • @widevader
    @widevader Рік тому +3

    On the triangle one, couldve used both before and after, and made 2 triangles. As first one you made plus the second one wouldve been the stuff you needed.

  • @simonswiss
    @simonswiss Рік тому

    OMG I had *never* noticed the "Diff" checkbox that gives you the "x-ray vision" - so useful when you try pixel push a value 😅

  • @ako1129
    @ako1129 Рік тому +2

    In the spikes challenge, couldn't he use 4 rectangles with the borders curved and then use 2 big triangles the same color of the background to divide them in half? Or put together 2 small triangles at the back of the white halfs? Or even keep that bigger black triangle and curve its border so it fits in the white part?

  • @JDalmasca
    @JDalmasca Рік тому +1

    I almost never use transform now that rotate and translate are their own properties (and use the GPU). It's a bonus that they also give you a higher score.

  • @eldrago3140
    @eldrago3140 Рік тому +1

    Your videos are the best 😊. Can you please make a video on drag and drop?

  • @glinda_rose
    @glinda_rose 6 місяців тому

    My solution to challenge 7 was to create 2 divs with a height of 50%, then create a load of circles with borders using position: absolute. Stick the circles inside the 2 divs and use overflow: hidden.

  • @beresteanugeorge
    @beresteanugeorge Рік тому +1

    For second challenge you can use border-radius: 100vmax for pill shape, then use clip-path: polygon (0 0, 0 100%, 100% 100%, 50% 100% )

  • @_g4m3r_
    @_g4m3r_ Рік тому

    Kevin's hair says it all for the last one! It was tough! 😊

  • @AndrewMolodushko
    @AndrewMolodushko Рік тому

    Kevin, thanks for your video. challenge 4. width:100, height:100, border-radius:100 0 100, rotate -45deg :)

  • @issussov
    @issussov Рік тому

    Looking at 36:00, aren't this 2 circles with same radius intersecting?

  • @trvvs
    @trvvs 9 місяців тому

    44:17
    div {
    width: 100px;
    height: 100px;
    background-color: orange;
    border-radius: 100% 0;
    rotate: -45deg;
    }

  • @bernardoramalhete8015
    @bernardoramalhete8015 Рік тому +4

    I completed the lotus challenge doing the leafs using borders. I used border: 50px solid then set their colors, after that I used a border radius of 140px to get the shape right. This way I did all the leafs using 1 div for each then rotating them accordingly. I also used a display grid for centering everything then repositioned the elements with position absolute. This way I used only 3 divs total and about 30 lines of css.

    • @bernardoramalhete8015
      @bernardoramalhete8015 Рік тому

      I commented before watching the last challenge. I laughet out loud when you discovered the border thing

  • @calle90
    @calle90 Рік тому

    I Love this kind of Videos

  • @JatinSingh-tw5dv
    @JatinSingh-tw5dv 2 місяці тому

    in challenge 3rd you can just make background transparent of box, only border of 30px I guess and use border-bottom-color:transparent;border-right-color:transparent; which would be more effective

  • @paulEze-b6h
    @paulEze-b6h Місяць тому

    Nice one 🎉🎉🎉🎉

  • @olesejus
    @olesejus Рік тому +2

    Lotus: border-radius: 200px 0 200px 0; width: 100px; height: 100px;

  • @UPLYNXED
    @UPLYNXED Рік тому +4

    Challenge 4 (Lotus): I used a repeating radial gradient inside of my first element to create the two background shapes, and a [border radius: 0 100%; rotate: 45deg;] for the foreground shape element.
    Ended up 88th on the leaderboard with that approach!
    Challenge 7 (Spiral): I used two elements stacks, with radial gradients with multiple color stops for each arc. Custom variables for the position and the stops so I could apply it to both elements and just adjust the vars for the lower one. Scored 58th doing it this way :D

  • @XanderStoot
    @XanderStoot Рік тому +1

    Challenge 3 - use borders top and left
    div {
    width: 250px;
    height: 150px;
    background: #6592CF;
    border-top: 50px solid #060F55;
    border-left: 50px solid #060F55;
    border-radius: 100px 0 0 0
    }

  • @RobBulmahn
    @RobBulmahn Рік тому

    For that second one giving you trouble with the triangles, my first thought went to clip-path.

    • @RobBulmahn
      @RobBulmahn Рік тому

      And for elbow, a dark blue div with one rounded corner, and then either inside or on top of that, a light blue div with one rounded corner.

  • @VeitLehmann
    @VeitLehmann Рік тому +1

    Just solved the spiral at 100% with 475 characters in about 1 hour, now let's see how you did it!

  • @padmanabhans6632
    @padmanabhans6632 Рік тому

    might help full! that was a right angled triangle !!

  • @SEWebDesign
    @SEWebDesign Рік тому

    I was yelling BLACK BLACK TRANSPARENT TRANSPARENT at the screen haha! Imagine all the times the answer has been right there when we hit a wall in CSS.

  • @Gary_Reid_Backing_Tracks
    @Gary_Reid_Backing_Tracks Рік тому

    I took a nap with autoplay on, and now I've woken up and signed up for CSSBattle...
    Two Battles down, 140+ to go!

  • @rodbrowning
    @rodbrowning Рік тому

    1:15:43 I thought it was just me struggling like that huashuashuas. looks like Im not alone.

  • @_tanzil_
    @_tanzil_ Рік тому

    57:45 At first i was like, dude... It's impossible with CSS only!!
    And then after few minutes of thinking 🤔: well,, that is kinda possible but I'm not 💯% sure 😄

  • @Tiagocf2
    @Tiagocf2 Рік тому

    wow that last one is mind blowing

  • @VeitLehmann
    @VeitLehmann Рік тому +2

    Just spent another hour on the spiral, now down to 348 characters which got me to #38 on the leaderboard! 😁 But how on earth can you solve this with 160 characters??

  • @kesvalsensei8251
    @kesvalsensei8251 Рік тому

    Please do more of these long videos!

  • @PowerfulJayKay
    @PowerfulJayKay 9 місяців тому

    Spending my days learning to become a web dev for 2025. My go to choice of procrastination has now become watching Kevin do CSS battle challenges.

  • @razor-4eg
    @razor-4eg 8 місяців тому

    1:03:15 - screaming in my head - border-bottom, border-bottom, border-bottom

  • @jan-kp6sj
    @jan-kp6sj Рік тому +2

    1:14:37 it started to look kinda sus

  • @MrKOHKyPEHT
    @MrKOHKyPEHT Рік тому

    OMG that spiral.... Jigsaw )) My solution: screenshot and background-image :D

  • @ISandbagI
    @ISandbagI Рік тому

    that final one gave me so much anxiety XD

  • @haythamkenway1561
    @haythamkenway1561 Рік тому

    Great video CSS king. I wonder if there's `JavaScript` battle or not.

  • @mikeynma
    @mikeynma Рік тому

    Isnt that the Dreamcast logo thing? Guess I should wait as you havent got there yet in my viewing 😂

  • @rodbrowning
    @rodbrowning Рік тому

    Awesome 😍

  • @yassinezanina
    @yassinezanina 9 місяців тому

    And here is me screaming at the screen from the top of my lungs black black transparent transparent 🤣🤣

  • @birdyperch
    @birdyperch Рік тому

    When I put display flex, justify content and align items center, the div still sticks to the top. I had to put a margin top to push it down and I have no idea why!

  • @julesfadel
    @julesfadel 5 місяців тому

    now i'm @ 1:02:36 and i'm crying of laughter 🤣

  • @Renegade192
    @Renegade192 Рік тому

    I haven't tried it, but on the challenge with the triangles couldn't you have used linear gradient to cut the box in half at a 45deg angle and have another box next to it with the corners rounded? Would that work?

  • @omarbader9529
    @omarbader9529 Рік тому

    this gave me a 100% on the lamp:
    body{
    background:#E38F66;
    }
    .a {
    position:absolute;
    top:90px;
    left:136px;
    border-bottom: 120px solid #FFFBDA;
    border-left: 32px solid #E38F66;
    border-right: 33px solid #E38F66;
    height: 0px;
    width: 63px;
    }
    .b{
    position: absolute;
    width:10px;
    height:90px;
    background:#62306D;
    top:210px;
    left:195
    }

  • @Debargha16
    @Debargha16 Рік тому

    You could had used mix-blend-mode in that flower type problem

  • @mannixmd
    @mannixmd Рік тому

    when Kevin said e a my mind immediately went to e a sports it's in the game 😂🤣

  • @svetsec
    @svetsec Рік тому

    I followed along the first challenge with you and somehow even though I typed display: flex, justify-content: center; align-items: center; it doesn't center my divs, but when I put height 100vh in body it centered the divs. What is the issue here?

    • @svetsec
      @svetsec Рік тому

      I actually figured this one out. I tried using Chrome and guess what? The same code centers the divs. But firefox won't. The hell?

  • @MeekoEdits
    @MeekoEdits Рік тому

    how do people get that spiral down to 160 characters? O.o the lowest I got was 339