News for hackers. Stuff that matters.
Re:Real-world CSS vs. CSS-in-JS performance comparison by iaml on Tuesday June 08, 2021 @06:21PM (#27441807)
> there's a lot more flexibility available if you choose to use classes

That is simply not true. Apart from what was described in the post above, in JSS frameworks such as styled-components, you usually have ways to hook directly into css parser, allowing you to implement custom expansions, replacements or basically whatever logic you want. This is not possible unless you write your own language and transform it to css.

Re:Real-world CSS vs. CSS-in-JS performance comparison by lwhi on Tuesday June 08, 2021 @06:46PM (#27442083)
We'll have to agree to disagree.
Re:Real-world CSS vs. CSS-in-JS performance comparison by Aeolun on Tuesday June 08, 2021 @07:28PM (#27442407)
CSS is not a programming language.

I find it hard to believe you think you can do more with plain CSS than with the full power of the Javascript programming language.

Re:Real-world CSS vs. CSS-in-JS performance comparison by lwhi on Wednesday June 09, 2021 @04:16AM (#27445479)
Sure CSS isn't a programming language.

However, when used correctly you can create a system that will allow you maintain and apply your presentation layer in an efficient, extensible, consistent and reusable way.

Lack of knowledge isn't an excuse for believing otherwise.

--

Edit: I'm actually shocked by how much bad feeling there is for standard front-end technology.

A domain specific solution is a benefit.

Re:Real-world CSS vs. CSS-in-JS performance comparison by iaml on Wednesday June 09, 2021 @04:20PM (#27452665)
> you can create a system that will allow you maintain and apply your presentation layer in an efficient, extensible, consistent and reusable way.

If that is your intention, typescript is a better tool for the job: you get type safety, ide autocomplete, tests (have you ever written a test for css?). You are right, being a domain specific solution is a benefit, but that has nothing to do with how good of a system you can make with it. I'm sure it's possible to write a system in typescript that would be as good as what you describe, but it will be more flexible at expense of being slower.

Re:Real-world CSS vs. CSS-in-JS performance comparison by lwhi on Monday June 14, 2021 @05:50AM (#27500868)
I don't know how to say this any other way.

I think you are entirely incorrect.

Typescript is absolutely not the solution.