4 ms·
functions in stylesheets? That's nuts. The web is developing in the wrong way.
by imcritic 2y ago
functions in stylesheets?
That's nuts.
The web is developing in the wrong way.
- nicce 2y agoInstead of XSSs we will soon have XSCSFSs (Cross Site Cascading Style Function Scripting)!
- rglover 2y agoThese aren't functions in the traditional programming sense. Looking at examples in the spec, they're mostly a way to do conditional logic around which properties to apply when (desperately needed in CSS as the only way to do this now—if at all—is with media queries, funky selectors, or as a last resort, JavaScript). Just finished work on a new CSS framework and would have loved to have stuff like this. If it lands with baseline support, I'd be able to save a lot of footprint using these.
- waste_monk 2y agoAlways has been.
- xigoi 2y agoCSS preprocessors like Sass have had functions for, like, ever.
- imcritic 2y agoAnd that's fine as long as there's a "build/process *.sass" step happening on the server before the resulting HTML+CSS is getting sent to the client (browser).