CSS has had native mixins for over a decade?!? |
CSS has had native mixins for over a decade?!? |
Jason Knight |
Dec 25 2022, 05:51 AM
Post
#1
|
Advanced Member Group: Members Posts: 103 Joined: 25-December 22 Member No.: 28,719 |
Not my usual first post on a forums, and I don't usually go around spamming links, but I just figured this out, can't find anyone else that seems to be aware of it and/or done it before me...
I hate CSS preprocessors for increasing CSS complexity, providing little if anything of value, and so forth. Even CSS variables were kind of useless until they were native (since you can change them on the fly)... Likewise for mixins I find them pointless compared to just grouping selectors apart from one little issue... if you need the same values both inside and outside media queries. But you can use keyframes and animation to create mixins that work all the way back to IE9! https://deathshadow.medium.com/css-has-supp...de-e6c77fe28751 For those who aren't medium members and/or used up their 3 free reads a month, here's a pen showing it in action. https://codepen.io/jason-knight/pen/PoBPpyj |
Lo-Fi Version | Time is now: 27th April 2024 - 11:02 AM |