Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
emmacharp
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
emmacharp
1y ago
Hello! Sorry for the delay, I thought the thread was indeed dead. Hehe. Maybe you are right about clamp(), but I still think it's only available through “obscure” means if I may say so. So yeah, a clamp utility would help. On performan
2.
▲
by
emmacharp
1y ago
Some real issues with Tailwind I don't see mentioned as often is they should revolve around the lack of some modern and efficient CSS features and techniques and the inefficient, outdated habits it tends to promote as a result. Over-re
3.
▲
by
emmacharp
1y ago
It comes from socially produced wealth and ressources, like all public services?
4.
▲
by
emmacharp
2y ago
Great! 1. some simple selectors can be used in specific contexts (like `html` for type inheritance, for instance). `flex-module` is a component name (albeit a very generic one only used for example purposes...) and `is-loading` is a "s
5.
▲
by
emmacharp
2y ago
1. Which part of the cascade do you struggle with? Because it can make your code really simple and efficient! 2. If you link your CSS inside your component you have a direct access to it. A simple editor split suffice to edit it. I would sa
6.
▲
by
emmacharp
2y ago
1. The stylelint config will flag any selector not scoped (be it a class or an attribute) to the filename. This way you'll be notified if any selector could be misapplied essentially preventing these global accidents. 2. You could use
7.
▲
by
emmacharp
2y ago
1. I don't think I understand why you think flex & grid are barely unusable... without a dozen classes..? Maybe an example would clarify this perception for me. 2. You barely need media queries anymore for responsive design. Auto-a
8.
▲
by
emmacharp
2y ago
Great questions/problems! 1. I address the problem of relevance by inserting the CSS right into the component with a link tag. If the component is not used, the CSS isn't either. A positive side effect of this technique is that y
9.
▲
by
emmacharp
2y ago
I invite (for fun and learning!) anyone here still thinking native CSS provides no efficient solution to the problems Tailwind may have solved 5 years ago to challenge me: Bring up any said problem and I'll give you an efficient, robus
10.
▲
by
emmacharp
2y ago
The clamp() CSS function (and auto-adapting grids) can reduce media query usage to a really loooow minimum. Nowadays I use media queries only for mobile nav and maybe layout grid adaptation. Like 2 to 4-5 media queries per project maximum.
11.
▲
by
emmacharp
2y ago
I started linking component stylesheets directly in the component HTML, de facto eliminating unused CSS from the output. HTTP3 provides performance gains we can benefit from by serving multiple CSS files "just-in-time". I've
12.
▲
by
emmacharp
2y ago
Yes it's still and always evolving and we need less and less of the heavy JS frameworks to produce interfaces. HTMX is way lighter than React, for instance. And from what I know, it's enough for many, many app use cases.
13.
▲
by
emmacharp
2y ago
Why would you need a custom selectbox in the example you provided? Because you could use the menu element with the popup API and AJAX if I understand your example correctly. On a sidenote, do you know about HTMX? If so, what do you think ab
14.
▲
by
emmacharp
2y ago
CSS was not meant to be used by programmers but by designers... so yeah there's a disconnect there. But that does not mean programmers cannot use it the way it was intended to instead of making it, at great cost, like what they would h
15.
▲
by
emmacharp
2y ago
My pleasure!
16.
▲
by
emmacharp
2y ago
For the curious, here is a set of "simple" rules for CSS authoring that, coupled with linting (through Stylelint, for instance) can address a lot (most?) of the issues raised in the article and the comments: https://ecs
17.
▲
by
emmacharp
2y ago
You may have to group elements, yes. But generally speaking, they already are grouped in some logical sense. And you can do a lot now with grid, without having to wrap child elements in containers. It's not absolutely separated but to
18.
▲
by
emmacharp
2y ago
Quite true, unfortunately. But I think there are benefits that can be "feeled" almost instantly. I think problem is one of focus. Lots of team leads don't focus on these solutions and their benefits but rather on the most rec
19.
▲
by
emmacharp
2y ago
You can use structural HTML and CSS inside components as their content is already structured and should not change on whim. Same for the first "master" layout layer. Applying styles with "form" classes like card still is
20.
▲
by
emmacharp
2y ago
Some thoughts on reasons above: With recent display roles (like grid, flex, contents, etc.) the HTML needed exclusively for layout problems is really minimized if not completely nonexistent. With `:has()` you can query "up" and &q
21.
▲
by
emmacharp
2y ago
Aren't there inherent advantages to correct and semantic code, advantages like performance, simplicity, understandability, expressivity, that could/should benefit the business?
22.
▲
by
emmacharp
2y ago
I'm curious, why would you say "applications don't map too well onto HTML"?
23.
▲
by
emmacharp
3y ago
Nice! They're great for establishing a strict scope for rulesets.
24.
▲
by
emmacharp
3y ago
I see, yes. I meant "efficient" in it's pure economic definition: Producing effectively with a minimum of waste, expense, or unnecessary effort. Is there a better term you're thinking of? And in my experience, the perfor
25.
▲
by
emmacharp
3y ago
I'm working on refactoring some sites in ECSS right now. I can report back when done if you care enough! As of now, you can look into the ecss.info CSS on github if you want a taste. Not large-ish, but still representative I'd say
26.
▲
by
emmacharp
3y ago
Thanks for the comment. It reminds me that examples should be more real-like. Hehe. Because, yeah, I would absolutely use a custom property for it. Same with .card, a simple example which in practice may be more precise, yes. Global scope i
27.
▲
by
emmacharp
3y ago
Yeah, I know about that. Still, a good point. Thanks. Nevertheless, in practice, I haven't seen any perceptible performance cost in using attribute selectors. It may have been the case years ago, when browsers weren't as efficient
28.
▲
by
emmacharp
3y ago
I'm curious: why is it such a bad choice? As for the #selector, in what cases do you need that much specificity? Not a rhetorical question!
29.
▲
by
emmacharp
3y ago
Thanks! And you're right about performance. The "just in time" approach as an alternative to the monolithic minified CSS file has proven to be quite interesting on this subject.
30.
▲
by
emmacharp
3y ago
As of now, you can integrate the Stylelint config in the editor/IDE of your choice to have live linting (tested with VS Code and Vim). Or you can run stylelint manually in the terminal. Didn't think about git pre-commit hooks to b
More ›