by thisislife2 14 hours ago

"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.

longor1996 13 hours ago

They're less functions and more akin to templates or hygienic macros, iiuc from the specs/docs

  • afavour 10 hours ago

    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.

bradley13 13 hours ago

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.

  • crocone 13 hours ago

    How niche would a website have to be to target the less than 1% of users who have disabled JS?

    • thisislife2 10 hours ago

      OP is saying disabling javascript may no longer work as desired if CSS is enhanced with JS features ...

      • afavour 10 hours ago

        But it isn’t? The functions discussed in the article are not connected to JS at all.

        • Izkata 6 hours ago

          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.

          • kdkwmdowmxks 4 hours ago

            So this is a semantics complaint? Man, developers are so anal about everything.

roblh 9 hours ago

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.

kdkwmdowmxks 4 hours ago

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.