One of the things that I'm really interested in about CSS is the new color-mod function. It will give us the ability to do color manipulations right in the browser. For example, when hovering over a button, you can change the color by using something like
color: color(black darkness(50%));, without the use of any CSS preprocessor like Sass.
But as the support of these CSS color functions is zero nowadays, we can temporarily use PostCSS and compile them as regular colors. Or we can experiment and discover the power of CSS
rgba() color functions to change colors on the fly! Let's see how we can use it.
The following is a guest post by Ahmad Shadeed. Ahmad has put together a ton of examples to show off how using relative units can benefit us. I think a lot of us think of units like
em as being for
font-size, which it is, but can also be for lots of other things, tying together typographic sizing and other visual elements.