2.0.1 • Published 1 year ago

elm-theme-tailwindcss v2.0.1

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
1 year ago

elm-theme-tailwindcss

Use elm-theme with Tailwind CSS.

Setup

Install this package as a development dependency.

npm i -D elm-theme-tailwindcss

Then set it up as a tailwind plugin.

// tailwind.config.js

module.exports = {
  plugins: [
    require("elm-theme-tailwindcss")
  ]
}

Strict Mode

If you want to make sure your codebase can only use elm-theme values, you can set strict option to true. This will disable tailwind's default colors and font families. It will also set some base styles so all your html elements are using your theme design tokens.

  
// tailwind.config.js

module.exports = {
  plugins: [
    require("elm-theme-tailwindcss")({strict: true})
  ]
}

Extra Colors

You can pass in your elm-theme's extra colors to your config as well if you wanna add extra colors to your theme (e.g. data visualization colors that fall out of the scope of the usual primary, secondary, etc, color schema).

Note that this can be used with or without strict mode.

  
// tailwind.config.js

module.exports = {
  plugins: [
    require("elm-theme-tailwindcss")({colors: ["cyan", "magenta", "yellow", "black"]})
  ]
}
2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago