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

118 lines
2.8 KiB
JavaScript
Raw Normal View History

2024-08-12 09:43:32 +02:00
const sharedConfig = require("zitadel-tailwind-config/tailwind.config.mjs");
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: {} } },
};
2024-04-23 10:50:58 +02:00
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})`;
2024-05-13 16:17:12 -04:00
colors[type][theme][`contrast-${shade}`] =
`var(--theme-${theme}-${type}-contrast-${shade})`;
colors[type][theme][`secondary-${shade}`] =
`var(--theme-${theme}-${type}-secondary-${shade})`;
});
});
});
2023-04-03 13:39:51 +02:00
/** @type {import('tailwindcss').Config} */
2024-11-22 11:40:21 +01:00
export default {
2023-04-24 17:31:59 +02:00
presets: [sharedConfig],
2023-04-04 15:23:14 +02:00
darkMode: "class",
2024-05-16 03:02:22 -04:00
content: ["./src/**/*.{js,ts,jsx,tsx}"],
2023-04-03 13:39:51 +02:00
future: {
hoverOnlyWhenSupported: true,
},
theme: {
extend: {
2024-04-23 10:50:58 +02:00
colors: {
...colors,
state: {
success: {
light: {
background: "#cbf4c9",
color: "#0e6245",
},
dark: {
background: "#68cf8340",
color: "#cbf4c9",
},
},
error: {
light: {
background: "#ffc1c1",
color: "#620e0e",
},
dark: {
background: "#af455359",
color: "#ffc1c1",
},
},
neutral: {
light: {
background: "#e4e7e4",
color: "#000000",
},
dark: {
background: "#1a253c",
color: "#ffffff",
},
},
alert: {
light: {
background: "#fbbf24",
color: "#92400e",
},
dark: {
background: "#92400e50",
color: "#fbbf24",
},
},
},
},
2023-05-23 11:15:47 +02:00
animation: {
shake: "shake .8s cubic-bezier(.36,.07,.19,.97) both;",
},
keyframes: {
shake: {
"10%, 90%": {
transform: "translate3d(-1px, 0, 0)",
},
"20%, 80%": {
transform: "translate3d(2px, 0, 0)",
},
"30%, 50%, 70%": {
transform: "translate3d(-4px, 0, 0)",
},
"40%, 60%": {
transform: "translate3d(4px, 0, 0)",
},
},
},
},
},
2023-04-04 15:23:14 +02:00
plugins: [require("@tailwindcss/forms")],
2023-04-03 13:39:51 +02:00
};