Top
Best
New

Posted by mpweiher 21 hours ago

Moving away from Tailwind, and learning to structure my CSS(jvns.ca)
480 points | 305 commentspage 3
pauxel 10 hours ago|
The part I’d miss most from Tailwind is not having to invent semantic-ish names for every wrapper, row, card, inner-card, card-content, etc.
Alifatisk 15 hours ago||
Oh, have we reached the end of the pendulum swing and are now swinging back to ordinary CSS again.
thiht 12 hours ago|
To be fair, CSS has evolved and improved A LOT in the past years, and a big reason why is Tailwind.
andy_ppp 5 hours ago||
Great stuff, one thing I tend to do is set the body font size to be 10px but in ems so all calculations can be made easily - body { font-size: 0.625em; // 10px } and then if you want a heading to be 20px you just do h1 { font-size: 2rem }
anydigital 12 hours ago||
We also moved away from Tailwind — Pico CSS. It feels like a breath of fresh, modern CSS air.

We actually loved it so much that we’ve taken over maintenance of a fork, and just released our Pico successor candidate: https://blades.ninja/

d3m0t3p 10 hours ago|
It is really fun that the navbar has unaligned elements. (Docs is lower)
anydigital 5 hours ago||
we were focusing on Mobile and Desktop versions, are you somewhere in between?

to be tracked here: https://github.com/anyblades/blades.ninja/issues/7

stephbook 16 hours ago||
I'm lucky to have learned the web with Angular 2.x

It scopes CSS to components by default, and keeps HTML, CSS and JavaScript seperate.

CharlieDigital 16 hours ago|
Vue single-file components (SFC[0]) still works this way.

    <template>
    <!-- Largely just HTML -->
    </template>

    <script setup lang="ts">
    // JS/TS as you would expect
    </script>

    <style scoped>
    /* Component scoped styles here */
    </style>
Very clean, easy to understand, and (as someone who started hand writing DHTML) it still feels very much like DHTML with more convenience and modern affordances.

[0] Vue SFC docs: https://vuejs.org/guide/scaling-up/sfc.html

neya 16 hours ago||
So, we're just going a full circle back now. Interesting.
eYrKEC2 15 hours ago||
_tailwind_ was the full circle. We had individual controls. We went to semantic controls, then back to individual controls a la tailwind.
4lx87 15 hours ago|||
Hope so. I’d like to be able to read the HTML templates again.
coffeefirst 13 hours ago||
Yep. Every 7 years.
moomoo11 1 hour ago||
oh god bikeshedding alert

next thread

microflash 13 hours ago||
> I’m a lot better at CSS than I was when I started using Tailwind.

> I got curious about what writing more semantic HTML would feel like.

This is so relatable. In the beginning of my career, I used to add so many dependencies for things I did not know. But these days, I mostly work on removing dependencies because I'm a lot better at using the web platform. I treat the web platform and browser primitives as materials to build what I want rather than a blank canvas to paint things from scratch.

grzes 15 hours ago||
tailwind is an anti-pattern that breaks separation of concerns rule. i'm amazed how it became so popular.
thiht 12 hours ago|
Because it’s a made up rule, not a law of nature. Having the styles inline on a component is very easy to reason about, it was just extremely impractical with CSS and the style attribute. Tailwind makes it easy, practical, and is actually well designed regarding its support for variables (ie. you can have a sane design system easily).

What you want to share/cascade is variables, not styles. Styling components makes it easy to make sure the styling of each component is isolated and doesn’t have unintended cascading effects. When working this way, using Tailwind is as much a good pattern than, say, CSS modules (which I like too).

jakubmazanec 6 hours ago|
For me, the main thing I love about Tailwind is that I don't have to create ad-hoc class names. No more BEM.
More comments...