Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
emmacharp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
121.
▲
by
emmacharp
4y ago
Why is the component-based approach to CSS not working here? Am I missing something?
122.
▲
by
emmacharp
4y ago
How is that better than enclosing CSS in a component file with a class as first selector? I see that bad developers could make mistakes, but besides that, which is kind of easy to lint, the only advantage I see is the need to maintain only
123.
▲
by
emmacharp
4y ago
I'll post one of my previous comments here, hoping to get a discussion going... > The problem with Tailwind for me is that Mr Wathan misrepresented « Good CSS » in his essay. His examples are BAD CSS, not good CSS. He then sets out
124.
▲
by
emmacharp
4y ago
> How much effort does it take to set up, though? Practically none. And any designer is prone to reuse the same spacings from project to project. So you bring the language file with you. Something like this : :root { --spacing-sm: 1rem
125.
▲
by
emmacharp
4y ago
> `body.single-page .entry-content .btn.btn-small {}` But why would you do that? That's awful CSS. And nothing calls for it. There also are tools for linting and analyzing CSS that would flag this atrocity. Everything is there for u
126.
▲
by
emmacharp
4y ago
But can't you do the same with CSS ? If every selector in a file begins with the component class, isn't it the same as writing styles in the component JS file ? I mean, the only real benefit I see is the forced encapsulation in JS
127.
▲
by
emmacharp
4y ago
What can't pure CSS do here and that Tailwind does ? The CSS syntax is already clean and standardized if you use it properly and don't name every little piece of interface. It is a genuine question, by the way...
128.
▲
by
emmacharp
4y ago
You can do exactly the same with pure CSS. This is not a Tailwind advantage.
129.
▲
by
emmacharp
4y ago
The problem for me is that Mr Wathan misrepresented « Good CSS » in his essay. His examples are BAD CSS, not good CSS. He then sets out to correct a problem with CSS that HE created by writing dirt poor CSS. `.author-bio > div > h2 {