Loading video...

Video Failed to Load

Go Home

CSS Clamp function ๐ŸŒŸ -> clamp() is a function in CSS that provides a concise way for combining both the min() and max() functions. โš  Note: This can be achieved by this also - min(100px, max(50%, 200px))

78,724 views โ€ข 1 year ago โ€ขvia X (Twitter)

0 Comments

No comments available

Comments from the original post will appear here

Related Videos

004/100 Buttons. A bit of the process on building an animation. When looking at a finished animation or in this example a finished button, it can look quite complex inside the CSS. But when building it, itโ€™s more like a lot of simple steps, one after another. Here I had the idea to make some kind of text animation like the footer logo on the Osmo site. I try to add the base animation with no complex easing, for example transition: translate 0.4s ease. Starting with just moving the one text from bottom to top and the other text to top. Adding a stagger, play around with it. Searching for a way to make it more circular. On the research I found the sin() function inside CSS which can build a more smooth non linear curve for the stagger which creates this circular effect. And step by step adding more complexity like, different easing for hover/hover-out, opacity, 3D transform and more. I use also the sin() function to rotate the letters, so the middle ones are getting more rotated than the outer ones. Another thing which helps is to add a small delay on hover, for example 0.05s or 0.1s, you donโ€™t really see the difference, but when you hover pretty fast on and out it doesnโ€™t get that jumpy. Iโ€™m using here GSAPโ€™s SplitText to split every char into spans. And then Iโ€™m adding a CSS index variable to every span, starting from the center. SplitText can provide CSS index variables, but you cannot tell it from which direction. For the sin() itโ€™s also important to have a max length, so I add another CSS variable with the max char number on it. Crafting 100 Buttons with Osmo โณ Total time: 63h

Eduard Bodak

165,738 views โ€ข 1 month ago