CSS-variables-based swappable themes for Tailwind CSS
MIT License
Published by innocenzi about 4 years ago
Published by innocenzi over 4 years ago
b4fa0305dfcedfecadd4a98ad6c06d706dd93c7f - Fixed an issue where utilities were generated in camelCase
instead of kebab-case
(eg. fontSans
instead of font-sans
) (https://github.com/innocenzi/tailwindcss-theming/issues/24)
Published by innocenzi over 4 years ago
This new major version is a rewrite of the plugin, with breaking API changes but better experience overall. The upgrading guide is yet to be written.
See this draft PR for more details: https://github.com/hawezo/tailwindcss-theming/pull/22
Published by innocenzi over 4 years ago
Published by innocenzi over 4 years ago
Published by innocenzi almost 5 years ago
Published by innocenzi almost 5 years ago
Published by innocenzi almost 5 years ago
Published by innocenzi almost 5 years ago
0,0,0,.5,.5
instead of 0,0,0,.5
).Published by innocenzi almost 5 years ago
.variable('name', 'value', 'tailwindConfigurationItem')
Published by innocenzi almost 5 years ago
.variable(name, value)
to add a custom property to a themeExample
The following theme configuration:
new Theme()
.color('primary', 'white')
.variable('theme-scheme', 'light')
.variable('font-title', ['Roboto', '"Segoe UI"', 'Arial']);
Will generate:
:root {
--color-primary: #ffffff;
--theme-scheme: light;
--font-title: Roboto,"Segoe UI",Arial;
}
Published by innocenzi almost 5 years ago
#ffffff00
would be white)#ffffff00
will be transparent)Note: v2.0.1 actually contains these changes, but v2.0.2 fixes a typo in them.
Published by innocenzi about 5 years ago
.default()
ThemeBuilder
is now more fluent.dark()
and .light()
helpers in ThemeBuilder
.schemeDefault()
, replaced by existing .default()
.keep()
, replaced by .assignable()
Published by innocenzi about 5 years ago
Published by innocenzi about 5 years ago
Published by innocenzi about 5 years ago