3 ms·
In programming, this problem would be solved with something like higher order functions or parametric data types, allowing us to both abstract out the commonali
by kian 7y ago
In programming, this problem would be solved with something like higher order functions or parametric data types, allowing us to both abstract out the commonalities and maintain incredibly specific, easily modifiable, highly customized functionality. Is there an analog in the CSS world?
- danpeddle 7y agoPlaceholders maybe? https://sass-lang.com/documentation/style-rules/placeholder-selectors https://sass-lang.com/documentation/style-rules/placeholder-... I use these a bit when I’m being more thoughtful, it’s a nice way to think about creating chunks of style that don’t get included in the output, bit surprised they weren’t mentioned yet.
- chrisweekly 7y agoThere doesn't need to be, given CSS-in-JS!
- koboll 7y agoIt's wild to me that most of the discourse around CSS-in-JS is about personal preference for how separation of concerns should be when its biggest advantage is totally orthogonal to that--it almost completely solves the issues of scope, specificity, and mapping styles to markup that so many different libraries and methodologies have been invented to cope with over the years.
- chrisweekly 7y agoupvoted and agreed