Earlier quoted context omitted.
Why do you feel it's nonsense? I'm genuinely curios. Personally I'm using Tailwind for 90% of the styling. If I keep repeating a certain combination of classes often, I'll group it with a custom class. (Edit: See colejohnson66's comment for an example) Two advantages of tailwind that I didn't see before I started using it: - It's often easier to find what I want in the tailwind documentation, and it comes with nice e…
My gripe with Tailwind is the redundancy of class definitions across elements that clearly would benefit from "normal" CSS. If I have a with a whole host of elements, those repeated class definitions become quite tedious.
Styling with Classy CSS (2006)
11–20 of 76 posts
Re: Styling with Classy CSS (2006)
#12Oh, we didn't? Well, time to learn a new syntax. (Was it `dark:md:hover:text-slate-400` or `hover:md:dark:text-slate-400` again?) At least Tailwind arguably has more benefits than its predecessors.
Re: Styling with Classy CSS (2006)
#13Re: Styling with Classy CSS (2006)
#14Earlier quoted context omitted.
My gripe with Tailwind is the redundancy of class definitions across elements that clearly would benefit from "normal" CSS. If I have a with a whole host of elements, those repeated class definitions become quite tedious.
Use PostCSS: .myFancyTable td { @apply p-4; } The advantage of Tailwind, IMO, is that styles for one-off components (like a breadcrumb bar) can just be written inline instead of in a separate file. But reused components like table cells should be using CSS selectors.
Re: Styling with Classy CSS (2006)
#15Earlier quoted context omitted.
Use PostCSS: .myFancyTable td { @apply p-4; } The advantage of Tailwind, IMO, is that styles for one-off components (like a breadcrumb bar) can just be written inline instead of in a separate file. But reused components like table cells should be using CSS selectors.
Cool. So @apply is basically a way to compose classes from other classes?
Re: Styling with Classy CSS (2006)
#16Earlier quoted context omitted.
My gripe with Tailwind is the redundancy of class definitions across elements that clearly would benefit from "normal" CSS. If I have a with a whole host of elements, those repeated class definitions become quite tedious.
Isnt this only a problem when the table contents are hardcoded ?
These are things that CSS literally solved with the web2.0/semantic-web movement 20 years ago. I get the convenience of Tailwind but a lot of it feels like a massive step backwards.
Re: Styling with Classy CSS (2006)
#17Re: Styling with Classy CSS (2006)
#18Also, if your company rebrands from green to red you can just `.f-green {color:#f00;}` - it's so efficient!
Re: Styling with Classy CSS (2006)
#19Back in the day we made fun of this nonsense, now we freakin glorify it with libraries like Tailwind & friends...
Why do you feel it's nonsense? I'm genuinely curios. Personally I'm using Tailwind for 90% of the styling. If I keep repeating a certain combination of classes often, I'll group it with a custom class. (Edit: See colejohnson66's comment for an example) Two advantages of tailwind that I didn't see before I started using it: - It's often easier to find what I want in the tailwind documentation, and it comes with nice e…
Re: Styling with Classy CSS (2006)
#20Back in the day we made fun of this nonsense, now we freakin glorify it with libraries like Tailwind & friends...
Why do you feel it's nonsense? I'm genuinely curios. Personally I'm using Tailwind for 90% of the styling. If I keep repeating a certain combination of classes often, I'll group it with a custom class. (Edit: See colejohnson66's comment for an example) Two advantages of tailwind that I didn't see before I started using it: - It's often easier to find what I want in the tailwind documentation, and it comes with nice e…
I completely rewrote the CSS for my website and I did not need to touch the templates. An .error is an error and a . collapsible is a collapsible. Their exact style is not dictated by the markup.
I also like that it keeps the markup small and easy to read, because it's not peppered with CSS.
It also avoids situations where two widgets look different because I forgot to copy one class over. A .collapsible is a collapsible.