Am I Good Enough To Solve These CSS Battles?

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

КОМЕНТАРІ • 84

  • @Dariansweb
    @Dariansweb 4 місяці тому +24

    cool man i did not even know there was a css battle page. that was lots of fun, thanks brother.

  • @jfftck
    @jfftck 4 місяці тому +64

    You can do the Deadpool with one div, ::before, ::after, border, and linear-gradient; it shouldn’t take so many elements, plus it would be easy to insert multiple copies on a page.

    • @sirajmussafirr147
      @sirajmussafirr147 3 місяці тому

      Thanks. I missed the linear-gradient, rest was as I implemented.

  • @gregtasi
    @gregtasi 4 місяці тому +5

    I'm really glad you are making a video like this again! I love CSSBattle! :D

  • @zackfoster3208
    @zackfoster3208 3 місяці тому +2

    This was a lot of fun. Especially doing it differently and still getting a good result. I only created one circle for the black circles and simply worked with gradients to color the middle red. this is the class for the div
    (note that i only looked at the video, the size might be a bit off cause i couldn't compare exactly)
    .black-circle {
    background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(159,51,51,1) 40%, rgba(159,51,51,1) 60%, rgba(0,0,0,1) 60%, rgba(0,0,0,1) 100%);
    height: 166px;
    width: 166px;
    border-radius: 100%;
    position: absolute;
    top: 50%;
    left: 17px;
    translate: 0 -50%;
    }

  • @programmingpillars6805
    @programmingpillars6805 3 місяці тому +2

    wow , im stunned how big this channel became ..

  • @ar-jun6631
    @ar-jun6631 3 місяці тому +4

    Lets try making a circle with bg black border 5px solid red and border radius 50%
    Add before and after element for eyes and place a absolute div for the middle line

  • @aurobindobhuyan2107
    @aurobindobhuyan2107 4 місяці тому +31

    We want rematch with Kevin 😂😂

  • @brendenwardle6585
    @brendenwardle6585 3 місяці тому

    good video you have one of the best channels for css

  • @krishnamoorthi9486
    @krishnamoorthi9486 3 місяці тому +2

    Great video brother.

  • @kopilkaiser8991
    @kopilkaiser8991 4 місяці тому

    You are the best in explaining complex CSS 😁

  • @mti4246
    @mti4246 4 місяці тому

    This was a really fun video.

  • @harag9
    @harag9 4 місяці тому +3

    Not bad... but it would be better if they would be scalable so not to use px settings so at the size defined it matches , but change the resolution and it should still look the same.

  • @AJCrowley
    @AJCrowley 4 місяці тому +1

    Would have been a golden opportunity to explorer content-box and border-box to control your overflows.

  • @binodgurung3367
    @binodgurung3367 3 місяці тому +1

    A circle with linear gradient and border with before after I guess...

  • @karimbouche3563
    @karimbouche3563 4 місяці тому

    Great kyle bravo

  • @pratikthorat3480
    @pratikthorat3480 4 місяці тому +15

    Hey this is amazing video. But honestly, I am not sure if I can use these techniques to debug how to have a hairstyle like you. 😢

  • @kevinbatdorf
    @kevinbatdorf 4 місяці тому

    would love to see the first one done by hand as an svg

  • @kuzestudio7383
    @kuzestudio7383 4 місяці тому

    Always love your content but the deadpool solution makes me cry 😂

  • @Dorgrident
    @Dorgrident 4 місяці тому +4

    Your version is very unstable.
    1. Use a border. or set the inner circle to inset: 0 and then use a margin to maintain the ratios.
    2. Position everything in relation to each other. if stuff is not 100% center, still set it to 50%, and then use calc to move it a few pixels up or down.
    3. User clippath to cut the circles in half.
    4. copy your left half and use scaleX(-1) to create an exact mirrored copy of your left half.

  • @dand4485
    @dand4485 4 місяці тому +3

    Love your stuff Kyle, just feels like you and Kevin Powell need another match... 🤪

  • @VeitLehmann
    @VeitLehmann 4 місяці тому

    The fun really starts when you try to get the character count down. Sure, you'll end up with crazy hacks, but it's addictive, and there's no way back! I got #204 down to 223 characters (and hope to improve it still, it's an ongoing battle), and #198 down to 195 characters😁
    You will also learn a lot, even if you might only use 5% of your learnings in production code.

    • @ptung90
      @ptung90 4 місяці тому

      It's really crazy, I've tried everything but can only get 508 characters. What tricks do you usually use?

    • @VeitLehmann
      @VeitLehmann 4 місяці тому +1

      @@ptung90 Which one are you talking about? Let's take #198 as an example:
      - Remove as much white-space as possible
      - You can use different units like %, vw, vh, em, ch, in, cm, q etc.
      - For some properties, especially old ones like margin, padding, width, height, you can omit the units and just put numbers to define pixel values
      - Use the * selector, and also nest it
      - Don't write out html and body, they're implicitly there
      - Use custom properties for repeating things
      You can also check the solutions of the daily targets to learn all the tricks

    • @ithelp-cm5bi
      @ithelp-cm5bi 4 місяці тому

      i have 480 characters with #204, and i have no idea what to improve. But i'm not front-end dev.

    • @VeitLehmann
      @VeitLehmann 4 місяці тому

      @@ithelp-cm5bi That's awesome, almost top 100, keep going! I'm playing this for more than a year already, and over time, you get better and better. So now I'm trying to get into the top 10. I have tried a couple of approaches for this target already, but I have no clue how on earth this can be brought down to less than 200 characters... And I am a front-end dev for more than 20 years now.

  • @GoldenMechaTiger
    @GoldenMechaTiger 4 місяці тому +2

    Would you actually try to make things like this using css in the real world? Would you not just use an image here?

    • @kresuu3567
      @kresuu3567 4 місяці тому +3

      The thing about css battles is not that you'll use what you actually do, like the deadpool face. It's more about building confidence to analyze a structure and being able to replicate it. Developing knowledge and learning new css properties along the way is also great

    • @GoldenMechaTiger
      @GoldenMechaTiger 4 місяці тому

      @@kresuu3567 But the knowledge won't be very useful if you're never making these complex icons using css in the real world

    • @kresuu3567
      @kresuu3567 4 місяці тому +2

      @@GoldenMechaTiger doing a complex little deadpool face can be broken down into steps. Aligning absolute elements, making half a circle, morphing elements along the x and y axis, etc. Are things that you will use in any project

  • @bernardiego
    @bernardiego 4 місяці тому

    26.5, Kyle :)

  • @yvng4697
    @yvng4697 4 місяці тому +2

    Guys do not log into Css Battles or else you cant delete your account.

    • @azusunwr
      @azusunwr 3 місяці тому

      Wdym??

    • @yvng4697
      @yvng4697 3 місяці тому

      @@azusunwr If you change your mind and you want to delete your account, there's no option to delete it. And I'm pretty sure that's illegal.

  • @akhileshakhi-ul7oo
    @akhileshakhi-ul7oo 4 місяці тому +1

    Why can't just use svg?

    • @VeitLehmann
      @VeitLehmann 4 місяці тому

      It's not allowed in this challenge. In production code, sure, that's what you would probably go for most of the time.

    • @Kitodev
      @Kitodev 4 місяці тому

      You are lazy 😂

  • @AmandeepSingh-sx9ke
    @AmandeepSingh-sx9ke 4 місяці тому

    Please bring some advanced projects on pure javascript

    • @youtubervideos
      @youtubervideos 4 місяці тому

      Without javascript below video
      ua-cam.com/video/SDSbdG09jds/v-deo.html

  • @samyborsos8394
    @samyborsos8394 4 місяці тому

    What Browser is he using?

  • @notmewooshme9916
    @notmewooshme9916 4 місяці тому +87

    Skill issue

    • @ingelegenial
      @ingelegenial 4 місяці тому +4

      😂😂😂

    • @IlyesCodes
      @IlyesCodes 4 місяці тому +1

      😂😂😂

    • @anuvette
      @anuvette 3 місяці тому +1

      😂😂😂

    • @f_cfox
      @f_cfox 3 місяці тому +1

      😂😂😂

    • @zaf417
      @zaf417 2 місяці тому +1

      😂😂😂

  • @shankxproductions7218
    @shankxproductions7218 3 місяці тому +3

    Now make it responsive 💀

  • @Dorgrident
    @Dorgrident 4 місяці тому

    no need to position absolute on the second battle. this is a flex element width skewed divs. incase there are more elements coming in the future, you should not call the elements "element-1,2,3,4,5" and so on, but work with nth-child.

  • @thoxbox
    @thoxbox 3 місяці тому

    gradients :)

  • @filon861
    @filon861 4 місяці тому

    if i need to create a half circle. i always do `border-radius: 0 0 100vw 100vw;` and it automatically turns the border radius to pill shape. and i dont have to play around and guess the px values.

  • @technicalatul8270
    @technicalatul8270 4 місяці тому

    🎉🎉🎉

  • @davlatberdinazarov179
    @davlatberdinazarov179 4 місяці тому

    Hello from 4

  • @okkaraung9512
    @okkaraung9512 4 місяці тому

    if you are not good enough, who is ?

  • @ezwtwrziehag1736
    @ezwtwrziehag1736 4 місяці тому +5

    hey why do you shake your head left and right all the time ?

    • @justineawunudo1005
      @justineawunudo1005 4 місяці тому

      Because he's probably using two screens, one to write code and the other to render the page

    • @harag9
      @harag9 4 місяці тому

      @@justineawunudo1005 No. it's when he's generally talking, not looking at screens. I find it distracting quite a bit, but there isn't anything he can do about it. it's like a nervous twitch or something.

    • @sfspmusic
      @sfspmusic 3 місяці тому

      Never noticed anything wrong about this channel

  • @makhmudjonjamoldinov3554
    @makhmudjonjamoldinov3554 4 місяці тому

    it feels like u are soooo frsutrated, and nervous on live...

  • @igordalpiazbauer2141
    @igordalpiazbauer2141 4 місяці тому

    happy to be first!

  • @QuantumCanvas07
    @QuantumCanvas07 4 місяці тому

    CSS people are designers not programmers so idfc

  • @paulwright4535
    @paulwright4535 4 місяці тому +1

    I Love your videos - but dude you need to make things a bit more exciting in your voice and tone ( I realise thats your style, but sometimes I drop off asleep listening along) - There's plenty of UA-cam tutorials on improving your speaking voice, and articulation and to keep the learners attention/retention.

    • @redx001-xxx
      @redx001-xxx 4 місяці тому +1

      He trying he's best
      And besides it doesn't even matter, as long as what he's explaining is understood perfectly your opinion on his voice and style is basically invalid 😒

    • @ibrahimblahblahyapyap
      @ibrahimblahblahyapyap 4 місяці тому +3

      So you don’t love his videos.
      Criticism, why must he change to accommodate your needs? This style of thinking continues to grow demand on a person until an inevitable breaking point, an unnecessary and unpleasant burden on someone else in exchange for self-interest.

    • @redx001-xxx
      @redx001-xxx 4 місяці тому +2

      @@ibrahimblahblahyapyap tnk you brother
      That's my point exactly
      Some ppl are just selfish 🧐
      Besides he's the only one complaining 😒

    • @paulwright4535
      @paulwright4535 4 місяці тому +2

      @@redx001-xxx Not complaining at all - Im providng valuable feedback. How else would the presenter learn to why x-amount of the audience disappear or fall asleep.
      It's knee jerk reactions that anything other than a "WOO ARESOME" is seen as trolling or being a mean ole dude. When in fact, with a bit of healthy honest feedback helps others learn.

    • @redx001-xxx
      @redx001-xxx 4 місяці тому

      @@paulwright4535 yes, valuable feedback indeed
      Like telling him his videos make ppl sleep isn't hard enough to be labeled criticism or just straight up bullying but I'm the troll,
      So much for being a jobless cyber bully😒
      Better crawl back into that basement you live it at ur parents house👋

  • @liquid394
    @liquid394 4 місяці тому

  • @виртуоз_ру
    @виртуоз_ру 4 місяці тому

    Хорош 👍