mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 18:02:33 +00:00
fix overridden styles, tailwind color map
This commit is contained in:
@@ -1,5 +1,37 @@
|
||||
const sharedConfig = require("zitadel-tailwind-config/tailwind.config.js");
|
||||
|
||||
let colors = {
|
||||
background: { light: { contrast: {} }, dark: { contrast: {} } },
|
||||
primary: { light: { contrast: {} }, dark: { contrast: {} } },
|
||||
warn: { light: { contrast: {} }, dark: { contrast: {} } },
|
||||
text: { light: { contrast: {} }, dark: { contrast: {} } },
|
||||
link: { light: { contrast: {} }, dark: { contrast: {} } },
|
||||
};
|
||||
const shades = [
|
||||
"50",
|
||||
"100",
|
||||
"200",
|
||||
"300",
|
||||
"400",
|
||||
"500",
|
||||
"600",
|
||||
"700",
|
||||
"800",
|
||||
"900",
|
||||
];
|
||||
const themes = ["light", "dark"];
|
||||
const types = ["background", "primary", "warn", "text", "link"];
|
||||
types.forEach((type) => {
|
||||
themes.forEach((theme) => {
|
||||
shades.forEach((shade) => {
|
||||
colors[type][theme][shade] = `var(--theme-${theme}-${type}-${shade})`;
|
||||
colors[type][theme][
|
||||
`contrast-${shade}`
|
||||
] = `var(--theme-${theme}-${type}-contrast-${shade})`;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
presets: [sharedConfig],
|
||||
@@ -12,5 +44,10 @@ module.exports = {
|
||||
future: {
|
||||
hoverOnlyWhenSupported: true,
|
||||
},
|
||||
theme: {
|
||||
extend: {
|
||||
colors,
|
||||
},
|
||||
},
|
||||
plugins: [require("@tailwindcss/forms")],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user