|
|
|
|
|
by andrei_says_
1041 days ago
|
|
One more thing I find baffling is the preference to ignore the cascade… and seeing it as a benefit. The cascade is where the value of CSS comes from! It’s an incredibly powerful concept. I use and love the Inverted Triangle CSS (ITCSS) approach and write a fraction of the CSS code I used to. Having a few utility classes, using variables for project-specific colors, breakpoints, spacing, using fluid typography, grid, and flexbox, make writing well-structured minimal CSS code a pleasure. https://www.xfive.co/blog/itcss-scalable-maintainable-css-ar... https://utopia.fyi/ |
|
Tailwind styles cascade just like any other CSS rules. No one is ignoring it. The reason it might appear not to is because Tailwind uses layers (https://developer.mozilla.org/en-US/docs/Web/CSS/@layer). Technically it's a polyfill at the moment, but v4 will use the native @layer syntax.
If anything Tailwind is actually better at using the cascade than most plain CSS approaches.