coracle/tailwind.config.cjs

80 lines
1.4 KiB
JavaScript
Raw Normal View History

2022-11-23 01:28:33 +00:00
/** @type {import('tailwindcss').Config} */
const colors = {
black: "black",
white: "white",
transparent: "transparent",
accent: "var(--accent)",
warning: "var(--warning)",
success: "var(--success)",
2024-02-23 18:37:58 +00:00
}
const baseColors = [
"neutral-100",
"neutral-200",
"neutral-300",
"neutral-400",
"neutral-500",
"neutral-50",
"neutral-600",
"neutral-700",
"neutral-800",
"neutral-900",
"neutral-950",
"tinted-100",
"tinted-200",
"tinted-400",
"tinted-500",
"tinted-600",
"tinted-700",
2024-02-23 18:37:58 +00:00
"tinted-800",
]
2024-02-23 18:37:58 +00:00
const dynamicColors = generateVariants(baseColors)
function generateVariants(baseColors) {
2024-02-23 18:37:58 +00:00
const result = {}
baseColors.forEach(baseColor => {
2024-02-23 18:37:58 +00:00
const lightKey = `${baseColor}-l`
const darkKey = `${baseColor}-d`
2024-02-23 18:37:58 +00:00
result[baseColor] = `var(--${baseColor})`
result[lightKey] = `var(--${lightKey})`
result[darkKey] = `var(--${darkKey})`
})
2024-02-23 18:37:58 +00:00
return result
}
2022-11-23 01:28:33 +00:00
module.exports = {
2023-03-16 19:03:42 +00:00
content: ["./index.html", "./src/**/*.{js,svelte}"],
2024-02-23 18:37:58 +00:00
darkMode: "class",
2023-03-16 19:03:42 +00:00
safelist: ["w-4", "h-4"],
2022-11-23 01:28:33 +00:00
theme: {
extend: {},
2023-12-08 23:29:44 +00:00
zIndex: {
none: 0,
2023-12-13 21:10:48 +00:00
feature: 1,
nav: 2,
chat: 3,
popover: 4,
modal: 5,
toast: 6,
2023-12-08 23:29:44 +00:00
},
screens: {
xs: "400px",
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
"2xl": "1536px",
},
2024-02-23 18:37:58 +00:00
colors: {
...colors,
...dynamicColors,
},
2022-11-23 01:28:33 +00:00
},
plugins: [],
2024-02-23 18:37:58 +00:00
}