Adding to <html>,<body> styles seems unelegant implementation for SSG #16596
Replies: 4 comments 1 reply
-
I think there is another way, that is to add styles using JS. But that brings a new question: What if we need to add too many styles to the extent that we find the advantage of Tailwind ( it brings convenience ), what should we do then? Is the answer "Let's rough it"? |
Beta Was this translation helpful? Give feedback.
-
@philipp-spiess Thanks for moving this to Discussion. Actually I found out it should better be a discussion 🙏🏻 |
Beta Was this translation helpful? Give feedback.
-
Styles for html, body can be applied in the index.css for Tailwind v4 which can solve this problem. It is actually kinda embarrassing to ask this question. Thanks all guys. Closed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Adding to , styles seems unelegant for static site generators like vitepress, Jekyll, Hugo, etc.
The image showed sentences in the docs but it doesn’t mention things about adding Tailwind classes to elements like and .
The frameworks I listed ( probably there are more... like Nextjs, Nuxtjs or something ) generate index.html as compilation results and put it in the */dist directory. To reach the element and I know two ways:
The first one WON'T WORK I think, because Tailwind scan files not covered by the content file globs as strings, whether those files contain HTML, JavaScript or any other language.
If there is a problem with my understanding, I welcome anyone to correct me 😢
I‘m asking this to find out, if there is a elegant way we could probably reach these elements?
Beta Was this translation helpful? Give feedback.
All reactions