Remix.run Logo
▲ alberth 8 hours ago

Maybe I’m alone, but all of those suggestions seem to make CSS needlessly complex (or more like JS).

Especially functions.

Makes me think of a previous post from the author, who wrote 100k lines-of-code to power their blog.

https://www.joshwcomeau.com/blog/how-i-built-my-blog-v2/

▲OuterVale 8 hours ago | parent | next [-]

Worth keeping in mind that Josh's blog is absolutely over-engineered and I'm sure he'd admit that himself. He tried to keep parity with his rather complex course systems and his blog itself is a lot more than 'text on a page'.

▲beej71 8 hours ago | parent | prev | next [-]

At last I can realize my dream of writing a JS interpreter in CSS! ;)

▲paczki 8 hours ago | parent [-]

offtopic here but what the heck, I am learning C from you right now! You finally made pointers click for me after failing to learn them a handful of times in the past. Legend!

▲bgarbiak 2 hours ago | parent | prev | next [-]

Functions might sound scary, but in reality they're used already in CSS processors like SASS/SCSS - and then they actually reduce complexity of the code.

The example with linear-gradient is probably the best use case for them.

▲gred 8 hours ago | parent | prev | next [-]

Yeah it looks to me like we're scraping the bottom of the barrel, if this is what's left.

▲troupo 2 hours ago | parent | prev | next [-]

For some reason CSS wants to have all the useful things from SASS without actually making them useful like SASS.

▲mattkenefick 5 hours ago | parent | prev | next [-]

i dont think functions belong there at all. i'd actually be pretty disappointed if they added them.

▲slow_typist 4 hours ago | parent [-]

I do not think functions in CSS are the original sin. Why we don’t have them, was a valid question in the 90ies already.

And you cannot emulate functions by using a preprocessor in all use cases.

But what bothers me is the governance model of CSS, the increasing complexity that leads ultimately to more framework usage, not to thoughtful engineering of accessible front ends.

Very soon CSS will be Turing complete and we can have a JavaScript-free C64 emulator. Yay.

We need basically control structures and full access to user input to achieve that.

And we can only hope the vendors get the sandboxing right this time, otherwise we will get a entire new class of CSS based browser exploits.

▲hackerman70000 2 hours ago | parent [-]

[dead]

▲SadErn 8 hours ago | parent | prev [-]

[dead]