Earlier quoted context omitted.
Instead of XSSs we will soon have XSCSFSs (Cross Site Cascading Style Function Scripting)!
At least it could probably run Doom
CSS Custom Functions are coming
31–40 of 90 posts
Re: CSS Custom Functions are coming
#32Thanks. Looks hideous. @function --light-dark(--light, --dark) { result: var(--light); @media (prefers-color-scheme: dark) { result: var(--dark); } }
Yeah, I couldn't believe it at first. If you're going to add imperative programming to CSS, just do it already. Hacking in conditionals in this way feels like a bad joke.
Re: CSS Custom Functions are coming
#33Thanks. Looks hideous. @function --light-dark(--light, --dark) { result: var(--light); @media (prefers-color-scheme: dark) { result: var(--dark); } }
Re: CSS Custom Functions are coming
#34Today on "everything that's wrong with modern web and more"
Re: CSS Custom Functions are coming
#35Re: CSS Custom Functions are coming
#36Today on "everything that's wrong with modern web and more"
It’s just a new addition and change, doesn’t dictate you must write that way. I still use as a tag (I know, HTML).
I don't know how you figured their complaint is somehow compat breakage. From what I know, CSS doesn't really have breaking changes.
Re: CSS Custom Functions are coming
#37functions in stylesheets? That's nuts. The web is developing in the wrong way.
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.
Re: CSS Custom Functions are coming
#38Re: CSS Custom Functions are coming
#39Re: CSS Custom Functions are coming
#40https://drafts.csswg.org/css-mixins-1/
I do think it's strange that using a wrapper like var() wasn't required here. Like func() or such. I'd actually rather that var() hadn't existed to begin with, but it should be consistent, at least.