←back to thread

304 points ulrischa | 6 comments | | HN request time: 0s | source | bottom
Show context
ricardobeat ◴[] No.44689124[source]

    <el-dialog-panel class="mx-auto block max-w-3xl transform overflow-hidden rounded-xl bg-white shadow-2xl ring-1 ring-black/5 transition-all group-data-closed/dialog:scale-95 group-data-closed/dialog:opacity-0 group-data-enter/dialog:duration-300 group-data-enter/dialog:ease-out group-data-leave/dialog:duration-200 group-data-leave/dialog:ease-in">
Lovely. Verbosity aside, now on top of knowing CSS you need to learn another hierarchical system within class names.
replies(14): >>44689142 #>>44689193 #>>44689633 #>>44690309 #>>44690466 #>>44690969 #>>44691000 #>>44691208 #>>44691531 #>>44692110 #>>44692147 #>>44692803 #>>44694185 #>>44700048 #
monkey_monkey ◴[] No.44689142[source]
Yes I agree - it's nice to be able to see exactly what's happening without needing to dive into a rats nest of fragile CSS cascades.
replies(3): >>44689203 #>>44689212 #>>44690264 #
1. skydhash ◴[] No.44689212[source]
Why not use the web inspector? That’s usually the quickest way to see which style is applied to an element.
replies(1): >>44689628 #
2. paradox460 ◴[] No.44689628[source]
People would rather have to parse out a big dumb list of classes than look at the actual list of what properties affect something, with a clear ability to drill down into them. Its madness, akin to carpenters giving up hammers, preferring to use glue, because they hit their thumb a few times by accident
replies(2): >>44690744 #>>44699839 #
3. skydhash ◴[] No.44690744[source]
Based on the code I've seen, including written by old me, it seems more like designing the architecture of the CSS styles (and sticking to it) is something people don't like to do. Tailwind is just a tool that is nicer than using the style attribute on the element.

I strongly prefer "button is-primary is-fullwidth" over the long list of tailwind classes.

replies(1): >>44691235 #
4. paradox460 ◴[] No.44691235{3}[source]
Same. And all the arguments about using component libraries, like the op, fall flat when you realize components can have scope local styles
5. sensanaty ◴[] No.44699839[source]
On the site I maintain at work, if I check literally any of the old components that don't use tailwind, what I see in the styles list of the devtools is 75 different variants of .card__wrapper or whatever all overriding each other, and it's often an abject nightmare trying to figure out which of the 75 different .card__wrapper (or is it .card { &.__wrapper} ?) classes is the one I care about at the moment.
replies(1): >>44703970 #
6. paradox460 ◴[] No.44703970{3}[source]
Click over to the computed styles tab, and now you have a list of all the styles that apply to an element, regardless of source. Click the arrow next to one and it shows you where it comes from

Also, have you ever tried to update old designs using tailwind? It's a disaster. Far easier to know what styles the ugly bem card class you mentioned apply to, rather than an arbitrary b-2 m-1