Awesome UI Interactions with the CSS Clip Path Property

Поделиться
HTML-код
  • Опубликовано: 2 дек 2024

Комментарии • 221

  • @DesignCourse
    @DesignCourse  5 лет назад +71

    What have you done with clip-path? Show me!

    • @mirrorlineentertainments9950
      @mirrorlineentertainments9950 5 лет назад +4

      What is your choice, XD, Sketch or Invision. Would love to know your opinion as a designer

    • @m3rl1on
      @m3rl1on 5 лет назад

      Nothing yet

    • @thedeveloper4207
      @thedeveloper4207 5 лет назад +3

      @@mirrorlineentertainments9950 XD or Figma....Invision next....Sketch maybe never

    • @keyos27
      @keyos27 5 лет назад

      @@thedeveloper4207 Why never?

    • @keyos27
      @keyos27 5 лет назад +2

      @@mirrorlineentertainments9950 Tools are just tools. They all work in a similar way. What really matters is how you build your design.

  • @SocksWithSandals
    @SocksWithSandals 4 года назад +6

    I've been doing front end for 15 years and never heard of clip path before.
    Never too old to learn!

  • @mathiasebner44
    @mathiasebner44 5 лет назад +75

    Love the video, pls do more UI interactions and aimations, it's so fun!

  • @wh4le287
    @wh4le287 4 года назад +3

    It never ceases to amaze me how powerful CSS can be. Setting this up with JS must be a nightmare... As always, great video!

  • @jackb7705
    @jackb7705 5 лет назад +31

    Use box-sizing: border-box; over width: calc(100% - 2em); This will take padding in to account when calculating widths. You don't want to be duplicating your code. Keep it DRY!

    • @musthavechannel5262
      @musthavechannel5262 4 года назад +1

      Also no units needed for 0, *rgba(255, 255, 255, 0);* can be *rgba(0, 0, 0, 0);* or simply *opacity: 0;* but don't forget to animate the opacity property in transition.

    • @lolow313
      @lolow313 4 года назад +3

      I always use this at the beginning of every css file:
      *{
      box-sizing: border-box;
      }

    • @tijsvlphotography
      @tijsvlphotography 3 года назад +1

      @@musthavechannel5262 You're correct with using opacity. But if you use rgba(0,0,0,0) the color would be changing during the .5s transition. So halfway during the transition the text would actually be rgba(127,127,127,0.5). Hardly noticeable that the "i" is gray at half opacity, but it's still an unwanted side effect you'd want to avoid. I'm with you on using opacity though.

  • @ericpodhorecki5427
    @ericpodhorecki5427 3 года назад +1

    just go straight to 5:45... that's where the clip-path comes in... good vid as always..

  • @wrends
    @wrends 5 лет назад +21

    wow! i've been searching for this so long...thank you sir!

  • @mdwebdevelopment7499
    @mdwebdevelopment7499 5 лет назад +2

    The best ever design content I have found on youtube.

  • @rajitgupta1140
    @rajitgupta1140 5 лет назад +2

    The fact that you are making tutorials on responsive css already made me sub😊
    Keep up the good work!

  • @casiothestrong
    @casiothestrong 5 лет назад +18

    @DesignCourse, why would you transition color of the span instead of opacity?
    Browsers recalculate a lot of layout information for all CSS properties except for opacity and transform. Those two properties are utilized in the Paint method of a browser so it's FAR less taxing on the computer/mobile device.
    Another way to optimzie the transitions/animations of your elements would be to use the 'will-change' property which is supported by most major browsers to tell the browser itself to optimize those transitions. This will ensure a smoother and less taxing UI for computer and mobile users.
    Just want to share this for all up-coming developers who want to learn the best practices.
    PS: Great tutorial. I love this concept behind this element.

    • @grzesieksgs
      @grzesieksgs 5 лет назад

      In additon, You should mention that `will-change` shouldn't be overused, and attached possibly just before transition happens, because it forces browser to create new layout layer ;)

    • @sjn_
      @sjn_ 5 лет назад +1

      I would say, these online web tutors should always mention this as a side note whenever they're animating the properties that are expensive.
      The clip-path may be easier to create this effect but not so performant on mobile devices. There should be more tutorials on creating animations like these but by only using transform as much as possible.
      I did something like what he showed in the video but using only transform property and it was pretty difficult to achieve compared to the clip-path, height/width method but much more smoother.

    • @dealloc
      @dealloc 5 лет назад +1

      When designing or programming, performance is important, but it is also too easy to jump in the rabbit hole of pre-optimization which is bad, because then you're writing code for optimization rather than readability most of the times, and that can hurt maintainability. Build first, optimize later.
      I like to think of performance as an accessibility, but don't overdo it. Sometimes it comes with costs too. E.g. the overuse of things like will-change, memoization, etc. can cause a design or an app to become slower over time.
      Test different devices and browsers to see if it affects performance, or has different visual artifacts.
      If your animations causes performance issues, just remove them. The less animation, the better. They may look fancy, but animations can hurt accessibility if it's overdone, so use it sparingly.
      Also opacity and color are different operations. Depending on what you're trying to achieve, you may have to consult to using one or the other. For example can animating opacity cause antialiasing on text to glitch in some browsers and devices such as WebKit/Safari, Opera, etc.

    • @jackb7705
      @jackb7705 5 лет назад +1

      Makes far more sense to use `opacity` or `display: none` over just changing color. What if I want to change the font color to orange? You'll get a weird gradient change from orange to white to transparent by using the color property.

  • @C2theCity
    @C2theCity 5 лет назад +1

    Amazing, didn't know so much was possible without any real coding like JavaScript or jQuery. Thanks!

    • @not2day646
      @not2day646 5 лет назад

      Ya css has gotten pretty powerful over the years.

  • @stevenwilson5556
    @stevenwilson5556 2 года назад

    Love your videos. clean and easy to follow and they are well presented in efficient manner. Also your sound is good which is always appreciated or more unappreciated when sound is bad haha. Cheers

  • @EzequielRegaldo
    @EzequielRegaldo 5 лет назад +13

    Hi ! thanks for your videos :D u can use "place-items: center" instead "justify-items and align-items" or "place-items: start auto" for example if u want to combine both

  • @luckie6593
    @luckie6593 4 года назад

    I just learnt a bunch of CSS and VScode tricks. amazing stuff. you earned a new sub!!

  • @Horoe
    @Horoe 4 года назад +5

    This is the first video I watched about sass and my brain is fried.

    • @raggebatman
      @raggebatman 4 года назад +3

      If you understand CSS then Sass won't be that hard. It's really useful as it greatly shortens down repetitive code, for example putting classes inside of the container class which would compile it to ".container .class"
      There's also functions, variables (which are a thing in CSS now but still) and a bunch more. Quite interesting, W3Schools has a really good tutorial on it if you think it sounds useful

  • @yusi9437
    @yusi9437 2 года назад

    How does youtube know what I need to watch suddenly? Thx a lot for this Gary 😄

  • @kipsangaaraplimo1442
    @kipsangaaraplimo1442 5 лет назад +10

    Great sir...Thanks am gonna do this tonight till dawn!

  • @kasta867
    @kasta867 4 года назад +1

    Love to see some love for pure Sass/Css animations! You earned a subscribe from me!

  • @اشکانمحمدی-ز1ث
    @اشکانمحمدی-ز1ث 4 года назад

    Thanks a lot sir. I really enjoyed every second of your video. After a lot of googling finally I figured out how to use clip-path

  • @soulvibration-groningen
    @soulvibration-groningen 3 года назад

    Wow this is effective and easy to use! A lot of video's I can play at 1.5 but your speed is great. Thanks for the tutorial.

  • @wgalloPT
    @wgalloPT Год назад

    Honestly, KISS principle applies here.....amazing tutorial, thank you...

  • @HikwaMehluli
    @HikwaMehluli 5 лет назад +1

    Always wanted to try clip path but never got around to it. Thank you for this , straightforward explanation & inspiring tutorial. ❤️ from 🇿🇼

  • @quentinli5802
    @quentinli5802 4 года назад

    i really like that circle part. thanks sir

  • @blendjams
    @blendjams 4 года назад

    With grid you can use place items, which is a combination of both justify and align items

  • @johngreen7535
    @johngreen7535 3 года назад

    ooohhh that will make my projects look way better! thank you!

  • @luisrogelio98
    @luisrogelio98 5 лет назад

    So cool didn't even know this was a thing , so many cool User interactions could be done with this

  • @sherozehaidervlogs3283
    @sherozehaidervlogs3283 4 года назад

    Thank you sir very much
    Your way of teaching is so brilliant by the way
    i am hovering many channel videos but most of the video that I like is yours.

  • @Awelmann1
    @Awelmann1 2 года назад

    Lots of cool syntax i didnt know before

  • @truejohnsolo
    @truejohnsolo 5 лет назад

    DUDE that is so cool! 😱😱 Was watching this while I'm out and about and I can't wait to get to my computer and experiment with that!

  • @MichaelCampbell01
    @MichaelCampbell01 4 года назад

    You're teaching me things I didn't know I needed, and now I can't live without. Thanks... I think? ;-)

  • @MastoSto
    @MastoSto 5 лет назад +2

    Thanks again Jeremy Renner!

  • @coldqueen9255
    @coldqueen9255 5 лет назад +2

    This is amazing! Please do more animations like this. I want to try making this with click event and add it to a div which already contains a paragraph.

  • @lcr833
    @lcr833 5 лет назад +2

    Great video and very good explanations. Cheers!

  • @PterPmntaM
    @PterPmntaM 4 года назад

    Good series of video i saw in your channel, thanks for all.

  • @bafercms1413
    @bafercms1413 5 лет назад +1

    This is impractical unless the container DIV has an absolute position with the z-index of zero and then on the span:hover event get changed to the largest z-index. So there is a need for a little javascript after all.

  • @АртёмИванов-я4ф
    @АртёмИванов-я4ф 5 лет назад +2

    That was awesome! I really love all these stylish gradients and animations in css. Thanks for the great vid!

  • @Brandonstiles
    @Brandonstiles 5 лет назад +1

    Great info! I'd never used clip path so I'm stoked to experiment

  • @stanleymasinde357
    @stanleymasinde357 5 лет назад

    This kinda opened my eyes. Thanks a lot

  • @DavidElstob73
    @DavidElstob73 5 лет назад

    Awesome. Just updated a client's website with this little trick. Thanks. :)

  • @prakash1to7
    @prakash1to7 4 года назад +1

    what a crazy reaction at 06:25 - "what is the fourth one?"

  • @nicholasc.5944
    @nicholasc.5944 3 года назад

    Quite an interesting css property

  • @play.dvdagreat
    @play.dvdagreat 3 года назад

    The outro is lit

  • @LumbreraEnMiCamino
    @LumbreraEnMiCamino 5 лет назад +2

    Please, more tutorials like this one!!!

  • @Ara_Ara2
    @Ara_Ara2 5 лет назад +1

    GREAT VIDEO but i think you should do like a review at the end and explain what's happening because sometimes it can be confusing

  • @stevevomwege3525
    @stevevomwege3525 5 лет назад +8

    Your intro makes me crazy!!! My brain is just expecting the third circle getting filled - BUT IT DOES NOT HAPPEN!!!!

  • @luis96xd
    @luis96xd 4 года назад

    Wow, excellent video, I liked this effect! Thanks 😄

  • @happykill123
    @happykill123 5 лет назад +50

    After looking at the Browser compatibility of clip-path, I would currently not use it.

    • @michrisoft
      @michrisoft 4 года назад +5

      ¯\_(ツ)_/¯ From what was used here, it works on every major browser. Did it on safari which is the only one that even looked questionable (besides internet explorer which doesn't support anything) with the lack of support for animations.

  • @csstutorials6333
    @csstutorials6333 5 лет назад +5

    Good video, like always I learned something new :D

  • @FullStackMaster
    @FullStackMaster 5 лет назад

    Thanks for this cool tips on css. I am looking for applying this to my project!

  • @AbdellahRamadan
    @AbdellahRamadan 5 лет назад

    Hello Gary. Thanks for the great video.

  • @StoryTeller25423
    @StoryTeller25423 5 лет назад +1

    I managed to follow the video really good doing it now as you say it but dude you are so fast the number of times i had to pause was just so much slow-down alil bit
    Thank you

  • @armelstsrt
    @armelstsrt 5 лет назад +5

    Hey Gary I was wondering: why do you make multiple rulesets of the kind "&:hover ***" ? I usually do it that way:
    .container {
    .a {...}
    .b {...}
    ...
    &:hover {
    .a {...}
    .b {...}
    ...
    }
    }
    Is there a particular reason why you do it the way you do it?

    • @xazzzi
      @xazzzi 5 лет назад

      Obligatory not Gary, but reason is - rule locality, if you have lots of selectors it comes handy to have regular/hover styles nearby.

  • @رافعمحمد-م4ك
    @رافعمحمد-م4ك 4 года назад

    You are hero man 👏🏼
    Keep going forward..

  • @pemessh
    @pemessh 5 лет назад

    Like always,
    amazing video

  • @dannyr2976
    @dannyr2976 3 года назад

    Excellent tutorial, thank you!

  • @jud4yah
    @jud4yah 4 года назад

    Thank you Hawk-eye

  • @chriscarton4728
    @chriscarton4728 4 года назад

    Nunito instead of Montserrat what a crazy man you are !!!

  • @r-i-ch
    @r-i-ch 5 лет назад +7

    Super cool but I feel this design is really brittle with "magic-numbers" like 4% moving things into place and centering just-so. "There has to be a better way..." - Not that being truly responsive is an issue (you can't hover with touch-interface), but changing fonts or sizes will kill this layout.
    Also, wouldn't it be more performant to only change the opacity and not the color transition on the "i" ?

    • @dealloc
      @dealloc 5 лет назад

      Agreed, this isn't very responsive.
      Also regarding performance; Don't pre-optimizing for something until it becomes a problem. Test across devices.
      That said, the way that color, opacity and transform are animated using transition are very performant, compared to layout such as positions (top, left, bottom, right) and box model stuff like margins, paddings, borders, width and heights, etc.
      Regarding using opacity vs color for transitions and animations, there are differences but they mostly depend on your needs.
      Opacity is applied to the whole element, rather than individual font, background and border color. It may cause problems with antialiasing for text if you're using opacity instead of rgba/hsla for example (depends on browser and device). There are some great explanations for why this happens that you can find in the wild.

    • @texxs01
      @texxs01 4 года назад

      @@dealloc And imagine all the extra work Sass would make when you try to make changes to something like this in the future?
      To the authors credit, he wasn't making a website really, just teaching us about a specific subject.

  • @AlexanderSavchenko91
    @AlexanderSavchenko91 5 лет назад

    Thanks a lot! Easy and awesome! can't wait to put it somewhere :)

  • @devarshbhatt5612
    @devarshbhatt5612 5 лет назад

    Great Tutorial, Very Helpful! Thank you very much!

  • @msdhaliwal
    @msdhaliwal 4 года назад

    you made it look super easy 👌🏻

  • @NaiReEimaiKyprios
    @NaiReEimaiKyprios 5 лет назад +5

    Great tutorial but can you show/recommend an alternative way of doing this without clip-path. Clip-path is not currently fully supported. Thanks!

    • @NaiReEimaiKyprios
      @NaiReEimaiKyprios 5 лет назад +1

      After some research, I've found some tutorials doing this with divs, if anyone is interested. Just search 'morphing menu button'.

    • @zebapy
      @zebapy 4 года назад

      You can do this with pseudo elements which will just take some effort to place and resize them on hover.

  • @g00dvibes47
    @g00dvibes47 5 лет назад

    I’m a big fan on using radial menus on mobile devices and other software where appropriate but never really thought about using it in a web app; thanks for the great content! Would be interested in seeing how to leverage this technique with something like Angular to manage view click events inside of the expanded radial. Anyway, thanks again

  • @phamtiensang3316
    @phamtiensang3316 3 года назад

    Omg, thanks alot !!!!!. I learn a lot from your video :333

    • @GamingTSH
      @GamingTSH 3 года назад

      bro Programming BY TSH This channel is so good bro .....channel name - Programming BY TSH

  • @olibear1966
    @olibear1966 4 года назад

    Is there an advantage to using the rgb() function of the color as opposed to changing opacity?

  • @gobadri
    @gobadri 4 года назад

    Hey you bad guy :D, you made me just stick to Montserrat then you switch it!! Now I'll go this path again with Nunito I think :D

  • @ikkyusan
    @ikkyusan 3 года назад

    Pretty cool 🤓 Thanks!

  • @abhishreymittal
    @abhishreymittal 5 лет назад +3

    Side navigation bar still not found... I am not going to college for now...😅
    Waiting for your video on the same...
    A big fan of your work...🤩🤩

    • @DesignCourse
      @DesignCourse  5 лет назад +3

      I've done some sidenav bar tuts! What are you looking for specifically?

    • @abhishreymittal
      @abhishreymittal 5 лет назад

      @@DesignCourse Can you give me the link

    • @abhishreymittal
      @abhishreymittal 5 лет назад

      @@DesignCourse Are those CSS based? Or any other language... I might have been looking it in wrong place all this time

  • @arsaljee6573
    @arsaljee6573 4 года назад

    Hi I want to ask you that you used nested class in css but how and what plugin you used for this purpose

  • @nawal7721
    @nawal7721 5 лет назад

    nice video. What's the extension for auto open/closing the html tags and writing the class which created the html tag with the class?

  • @RajPhotoEditingMuchMore
    @RajPhotoEditingMuchMore 3 года назад +1

    Amazing sir, thanks a lot 😊😊🙏

  • @csscrafts1170
    @csscrafts1170 4 года назад

    The last time I checked I was not able to apply transitions on Clippath property . What is happening?

  • @naimurhasanrwd
    @naimurhasanrwd 5 лет назад

    Awesome plan

  • @najimali32
    @najimali32 4 года назад

    Crazy man😻. Will try it.

  • @leolr111
    @leolr111 5 лет назад

    Great tutorial!, thanks for share, greetings from Mexico :)

  • @alexgochenour8740
    @alexgochenour8740 4 года назад

    That was brilliant. Concise, with a ton of great techniques. Thanks!

  • @saurovrc
    @saurovrc 4 года назад

    Very informative .. can you show a basic tutorial of svg animation

  • @razenkellesly20
    @razenkellesly20 5 лет назад

    Creative As usual . Thanks

  • @dennysmiranda5561
    @dennysmiranda5561 3 года назад

    Hello, so I am having a problem when using clip path and I have no clue if there is a solution.
    Apparently I cannot use overflow auto because clip path makes it by default overflow hidden.
    This is an issue more in iOS safari
    Can anyone please help me?

  • @mayurravindra9433
    @mayurravindra9433 3 года назад

    Thank You Sir!❤

  • @AlbertoChamorro
    @AlbertoChamorro 5 лет назад

    Thanks for this video, it's so cool!

  • @quytanairhouse
    @quytanairhouse 3 года назад

    Wow, tks so much, it's great video

  • @mkm1015
    @mkm1015 4 года назад

    Gary, you are an awesome dude. So much knowledge & tips on your channel.
    Thank you for everything, seriously.
    A quick question-
    I want to get into graphic design but don't know should I focus just on one thing (logo deisgn or web design for example) or be a ninja master like you?? :) I mean you know EVERYTHING ( logo design, web/UI deisgn, front-end dev)
    Specialize or generalize? What is in demand?

  • @CoderSprint
    @CoderSprint 5 лет назад

    That was amazing. I dont need gsap after watching this!
    Thanks Gary

  • @stephenjames2951
    @stephenjames2951 5 лет назад

    Pretty cool with minimal code.

  • @Driinufyer98
    @Driinufyer98 4 года назад

    Cool video thanks for sharing

  • @uncle-xxi
    @uncle-xxi 5 лет назад

    Really cool stuff!

  • @jampietri583
    @jampietri583 3 года назад

    Nice metal outro song

  • @ankushsonone8433
    @ankushsonone8433 3 года назад

    Awesome brother

    • @GamingTSH
      @GamingTSH 3 года назад

      bro Programming BY TSH This channel is so good bro .....channel name - Programming BY TSH

  • @DARKKNIGHT-ur7uz
    @DARKKNIGHT-ur7uz 5 лет назад +1

    Hii sir,
    Ur Indian Fan here
    Love ur videos ❤
    Post these amazing techniques very helpful for Web Designers ☺

  • @xXDarkice
    @xXDarkice 5 лет назад

    your ui video was awesome

  • @piyushgupta809
    @piyushgupta809 5 лет назад

    awesome tutorial !

  • @vinothkumarv9722
    @vinothkumarv9722 4 года назад

    Hi love css and also u r teaching is awesome .... love you friend please give me more vidoe like this types of ui intraction... :)

  • @anawhite2562
    @anawhite2562 5 лет назад

    this is AWESOME!

  • @Soap_js
    @Soap_js 3 года назад

    well done

  • @elgs1980
    @elgs1980 3 года назад

    Thank you so much!

  • @royal6439
    @royal6439 5 лет назад

    what are the the extension which you use for css and html?

  • @enkr1
    @enkr1 4 года назад

    Inspiration! thank you!!

  • @MikeNugget
    @MikeNugget 5 лет назад +3

    Clip path partially supported yet

  • @adityarocker7205
    @adityarocker7205 4 года назад

    really fantastic