Hey all! 👋 I’m Ryo, a Sr. Design Technologist at PlayStation. I do web dev with React/TS/Node and game dev with Unity/C#/C++/OpenGL/DirectX. Feel free to ask me any questions! 🤘
I’ve been having the same issue. I’ve used utility CSS in the past for modifications/overrides on top of OOCSS classes, but never used it to style the entire app.
It seems excessive, disorganized, and counterintuitive. While being modular and “optimal” (when paired with Purge), its reduced things like code readability. Takes 5 mins just to parse all the props mentally (and tie them to DOM nodes), when I could attach them to a class name mentally. I could see the argument for the complexity of The CSS mental model, but this is by far the solution.
And anyone who says to use @apply — no. At that point you might as well use CSS properties and CSS vars (custom properties). It’s crazy watching people go all the way into a CSS file just to still write utility shorthand that’s a few characters shorter than the original CSS syntax.
And wrapping the Tailwind in a React/Vue/etc component is sweeping a mess under the rug. You still have to deal with that mountain of utility classes sometime.
I am a big fan of “utility style props” (aka Styled System, xStyled, Restyle) which are basically like Tailwind combined with React props, but more efficient with CSS in JS managing class names and chunking CSS.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I’ve been having the same issue. I’ve used utility CSS in the past for modifications/overrides on top of OOCSS classes, but never used it to style the entire app.
It seems excessive, disorganized, and counterintuitive. While being modular and “optimal” (when paired with Purge), its reduced things like code readability. Takes 5 mins just to parse all the props mentally (and tie them to DOM nodes), when I could attach them to a class name mentally. I could see the argument for the complexity of The CSS mental model, but this is by far the solution.
And anyone who says to use @apply — no. At that point you might as well use CSS properties and CSS vars (custom properties). It’s crazy watching people go all the way into a CSS file just to still write utility shorthand that’s a few characters shorter than the original CSS syntax.
And wrapping the Tailwind in a React/Vue/etc component is sweeping a mess under the rug. You still have to deal with that mountain of utility classes sometime.
I am a big fan of “utility style props” (aka Styled System, xStyled, Restyle) which are basically like Tailwind combined with React props, but more efficient with CSS in JS managing class names and chunking CSS.