Live data from Hacker News

Real-world CSS vs. CSS-in-JS performance comparison

pustelto.com

161–165 of 165 posts

Re: Real-world CSS vs. CSS-in-JS performance comparison

#161

Earlier quoted context omitted.

Fully agree. It's usually the people that have never worked with it that share their opinion, always ending with "why do we need this" Can encourage others to give it a try as well. Dev productivity through the roof indeed :)

Trying to get my team to consider the switch from Bootstrap to Tailwind. All of this talk makes me jealous

Nothing beats a live demo.

Re: Real-world CSS vs. CSS-in-JS performance comparison

#162

Earlier quoted context omitted.

Fully agree. It's usually the people that have never worked with it that share their opinion, always ending with "why do we need this" Can encourage others to give it a try as well. Dev productivity through the roof indeed :)

Comparing Tailwind with Web Components might be a bit unfair. It is well known that Web Components have terrible dev ergonomics. It would be more fair to compare with frameworks that work with scoped styles (such as Svelte or Vue’s single file components). Developing in these is also an excellent productivity boost.

It is not well known that web components have terrible dev ex, because it isn't true.

Re: Real-world CSS vs. CSS-in-JS performance comparison

#163

Earlier quoted context omitted.

Can anyone give some references on that Web Components have bad dev ergonomics? Is it just that Web Components don't allow passing of complex types so you have to stringify everything?

I see many people have problem with that in the comments here. However I don’t find that to be an issue. Passing properties (as opposed to attributes) allows complex types and many popular frameworks have a handy shorthand for it (e.g. in lit-html you write ` `). In my opinion the bad ergonomics is actually when authoring the components (not consuming it). Many of the faults have been excellently pointed out previous…

Thanks for the response, I appreciate it!

Re: Real-world CSS vs. CSS-in-JS performance comparison

#164
post #157
post #138

Earlier quoted context omitted.

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.

> 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…

I don't know how to say this any other way.

I think you are entirely incorrect.

Typescript is absolutely not the solution.

Re: Real-world CSS vs. CSS-in-JS performance comparison

#165

Earlier quoted context omitted.

CSS scoping without a hacky third party framework is long overdue. Web components largely failed at this point though, the spec needs to be rewritten from scratch to be more pragmatic. People have been using React and Co for more than a decade now, spec writers certainly have enough hindsight as to how people practically program front-end applications.

Please give me web-components without Javascript and I'll start using them heavily.

well, it was kind of the whole point of XHTML2 spec. The Web component spec is just an inferior version of it, that's why it failed.
Post reply on HN