Iβm on the 7th screencast βCustomizing your design systemβ, itβs talking about themes.
This is handy way to see the full default config file from Tailwind CSS, just run
npx tailwind init tailwind-full.config.js --full
You can scaffold this file (after running aforementioned command to generate this file). You are free to edit the values to whatever you want
Downsides to this approach:
- Customised Vs Default π€π€·π»ββοΈ
- Upgrading Tailwind CSS wonβt automatically inherit new styles (youβll miss out on new features) π
But you will have full ownership of this config file, just not up-to-date with TailWind CSSβ latest developments.
So alternatively, you can use a minimal default config file. With this way, you can inherit Tailwind CSSβ new design updates.
π This is the recommended way as you can see your custom changes only and leaving the default config file alone.
Other things to note
In the tailwind.config,js:
theme: {
colors: {
βbrand-blueβ: β#1992d4ββ
},
extend:{}
},
- In βthemeβ,
coloris at the root and overrides all the other colours (which is handy if you want to have control of your own brand colours, for example). This does mean it wipes out Tailwind CSSβ default colour palette like gray, indigo, etc. This means onlyβbrand-blueβ: β#1992d4ββexists! - If you want to keep Tailwind CSSβ default palette colours, use
extendsection in the config file. Anything in here will be merged with the default values.
And that's as far as I got... adulting and dinner-making a calling 'cause I'm hungee, and it's good to take a break. π

Top comments (0)