"Functions in CSS" - Bah! That's all we need to make CSS even more convoluted - make it compete with Javascript now ... All these feature creep is just to make sure nobody else can create another browser engine.
This. Currently, if you don't want web pages "computing", but you still want basic content, you can turn off JS. Add explicit functions to VSS makes this impossible.
As someone mentioned above, it probably would have been better if they weren't called functions. Macros, maybe.
Also the blog really doesn't help by describing it like this:
> If you’re familiar with JavaScript, this should feel pretty familiar. We define new functions with @function and specify the returned value with result.
They're less functions and more akin to templates or hygienic macros, iiuc from the specs/docs
Part of me feels like naming them functions was a mistake. The other part things screw it, the haters are going to complain no matter what you do.
This. Currently, if you don't want web pages "computing", but you still want basic content, you can turn off JS. Add explicit functions to VSS makes this impossible.
How niche would a website have to be to target the less than 1% of users who have disabled JS?
OP is saying disabling javascript may no longer work as desired if CSS is enhanced with JS features ...
But it isn’t? The functions discussed in the article are not connected to JS at all.
As someone mentioned above, it probably would have been better if they weren't called functions. Macros, maybe.
Also the blog really doesn't help by describing it like this:
> If you’re familiar with JavaScript, this should feel pretty familiar. We define new functions with @function and specify the returned value with result.
So this is a semantics complaint? Man, developers are so anal about everything.
Things incoming when this goes live
- “I made doom run with only css functions!”
- “CSS function vulnerability exposes api keys in NextJs server side rendering”
- “css function used for fingerprinting violates EU laws”
- “Facebook/Meta caught tracking users using CSS function exploit”
I’m being facetious, mostly.
CSS is not at all convoluted. As far as complicated technology goes it is refreshingly simple.
Style and keep an eye out for the cascade.
Simplicity itself.