4 ms·
The “config” is just tailwind.config.json next to your package.json. The most basic file is literally just: module.exports = {} That alone gives you all t
by colejohnson66 5y ago
The “config” is just tailwind.config.json next to your package.json. The most basic file is literally just:
module.exports = {}
That alone gives you all the Tailwind defaults. But it’s customizable to infinity. tailwindcss.com’s documentation on individual classes is extensive on customization.
- lmm 5y agoOK but you still haven't given any example of the part that actually does something, the part where you somehow go from "text-company-500" to red and whatever.
- colejohnson66 5y agoWhy? We're discussing Tailwind in this thread. If you aren't aware that Tailwind isn't just the classes, but also a CSS preprocessor, we can't have a productive conversation. But if you insist: https://tailwindcss.com/docs/adding-custom-styles https://tailwindcss.com/docs/adding-custom-styles There you can see that the example config file there defines custom colors (which could be your company branding colors). They don't have to be named actual colors; I could use `"mygreen": "#8FB68F"` (random color I just generated) if I so desired. Then, during my website's build process (into static HTML), any usages of "text-mygreen-500", for example (colors are 100-900), will generate a CSS selector automagically.
- lmm 5y agoWe're discussing how to set up a maintainable website where you can do things like change your company's brand colour from red to blue in one place and apply that consistently across your website. "Use Tailwind" isn't an answer to that any more than "Use CSS" or "Use HTML" is.