What if we arent using nodejs for a website? #2459
-
I want to add dark mode but Im not using nodejs what can I do? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Can't you use it in a local env, compile, then just use the dist code on your site? |
Beta Was this translation helpful? Give feedback.
-
Hey! To be able to use dark mode, which is not enabled by default, you’ll need to compile Tailwind via PostCSS. You need NodeJS to run PostCSS plugins on your machine - but if I understand your question correctly: you don’t need a Node server for the website you are building - it can be just static HTML, or anything you want. Think of building/compiling Tailwind as a build step, that happens while you develop the site. This generates a plain CSS stylesheet, that you can use without any need for NodeJS once it’s compiled. Hope it makes sense and is a useful answer. |
Beta Was this translation helpful? Give feedback.
Hey!
To be able to use dark mode, which is not enabled by default, you’ll need to compile Tailwind via PostCSS.
You need NodeJS to run PostCSS plugins on your machine - but if I understand your question correctly: you don’t need a Node server for the website you are building - it can be just static HTML, or anything you want.
Think of building/compiling Tailwind as a build step, that happens while you develop the site. This generates a plain CSS stylesheet, that you can use without any need for NodeJS once it’s compiled.
Hope it makes sense and is a useful answer.