Files
zitadel/apps/login/tailwind.config.js

54 lines
1.3 KiB
JavaScript
Raw Normal View History

2023-04-24 17:31:59 +02:00
const sharedConfig = require("zitadel-tailwind-config/tailwind.config.js");
2023-04-03 13:39:51 +02:00
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})`;
});
});
});
2023-04-03 13:39:51 +02:00
/** @type {import('tailwindcss').Config} */
module.exports = {
2023-04-24 17:31:59 +02:00
presets: [sharedConfig],
2023-04-04 15:23:14 +02:00
darkMode: "class",
2023-04-03 13:39:51 +02:00
content: [
2023-04-04 15:23:14 +02:00
"./app/**/*.{js,ts,jsx,tsx}",
"./page/**/*.{js,ts,jsx,tsx}",
"./ui/**/*.{js,ts,jsx,tsx}",
2023-04-03 13:39:51 +02:00
],
future: {
hoverOnlyWhenSupported: true,
},
theme: {
extend: {
colors,
},
},
2023-04-04 15:23:14 +02:00
plugins: [require("@tailwindcss/forms")],
2023-04-03 13:39:51 +02:00
};