flowbite
flowbite copied to clipboard
Unable to alias colors after loading Flowbite plugin
Describe the bug
In 'native' Tailwind, I can alias colors — e.g. have X-gray-XX
point to X-pink-XX
, etc. However, if I load the Flowbite plugin into my Tailwind config (via plugins: [require("flowbite/plugin")]
), this behavior is prevented, and only new custom colors can be created.
To Reproduce
- Go to this Tailwind Play minimum reproducible example.
- Note that the gray – pink alias does not work.
- Remove the Flowbite plugin import.
- Note that the gray – pink alias does work.
Expected behavior
The Flowbite plugin shouldn't disable color aliasing.
Desktop (please complete the following information):
- OS: macOS Ventura
- Browser: Brave
- Version: latest Flowbite version, Brave v. 1.48
Additional context:
Problem occurs in other major browsers as well.
I poked around a bit in the node_modules
folder and figured things out — it seems like the colors need to be aliased from within the extend
key, as so:
theme: {
extend: {
colors: {
gray: colors.pink,
}
},
},
However, still leaving this app, as the relevant official Flowbite documentation section is currently misleading / incomplete.
Bump up the issue. It should not work like this and if it should, then it should be described in the documentation