this post was submitted on 02 Aug 2023
66 points (100.0% liked)

Programming

13376 readers
2 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 year ago (2 children)

Ok so use modern frameworks and tools that implement the tailwind plugin. Because if you are shipping the entire tailwind css that's a developer problem not tailwinds. News flash: using a technology wrong doesn't make the tech wrong.

[–] [email protected] 5 points 1 year ago (1 children)

News flash: your snark makes you an unpleasant person. Read my comment again. I said tree shaking fixes this... unless you don't know what content you'll display and what classes you'll need at build time. Not all sites are static.

[–] [email protected] 3 points 1 year ago (1 children)

Unless you are going to be allowing custom html to be added the tooling is smart enough to figure out what possible classes your code can use. You'd have to do something dumb to not have the tools able to tell what components you are serving.

[–] [email protected] 1 points 1 year ago (1 children)

More generally, the more you have a flexible editor in the app, the worst it gets. This is the use case where I ran into trouble.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Make an element that is hidden that has all possible values of classes you can use. Or use normal css for that one part of your app if that isn't possible. Lots of ways you can handle this without thinking the framework doesn't work.

Ninja:

https://tailwindcss.com/docs/content-configuration#safelisting-classes

Tailwind actually has this use case covered already. Use the safe list functionality to always include the classes you need.

[–] [email protected] 2 points 1 year ago

The "News Flash" bit was unnecessary. Please keep your replies to other users respectful on Beehaw.

Thanks!
[email protected] Moderation Team