2023-07-13 07:22:08 -04:00
|
|
|
const themeColorRamps = [
|
|
|
|
{ name: 'chalkboard', stops: 12 },
|
|
|
|
{ name: 'energy', stops: 12 },
|
|
|
|
{ name: 'liquid', stops: 12 },
|
|
|
|
{ name: 'fern', stops: 12 },
|
|
|
|
{ name: 'cool', stops: 12 },
|
|
|
|
{ name: 'river', stops: 12 },
|
|
|
|
{ name: 'berry', stops: 12 },
|
|
|
|
{ name: 'destroy', stops: 8 },
|
|
|
|
{ name: 'warn', stops: 8 },
|
|
|
|
{ name: 'succeed', stops: 8 },
|
|
|
|
]
|
|
|
|
const toOKLCHVar = val => `oklch(var(${val}) / <alpha-value>) `
|
|
|
|
|
|
|
|
const themeColors = Object.fromEntries(
|
|
|
|
themeColorRamps.map(({name, stops}) => [
|
|
|
|
name,
|
|
|
|
Object.fromEntries(
|
|
|
|
new Array(stops)
|
|
|
|
.fill(0)
|
|
|
|
.map((_, i) => [
|
|
|
|
(i + 1) * 10,
|
|
|
|
toOKLCHVar(`--_${name}-${(i + 1) * 10}`),
|
|
|
|
])
|
|
|
|
),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
2022-11-22 09:06:08 +11:00
|
|
|
/** @type {import('tailwindcss').Config} */
|
|
|
|
module.exports = {
|
|
|
|
content: [
|
|
|
|
"./src/**/*.{js,jsx,ts,tsx}",
|
|
|
|
],
|
|
|
|
theme: {
|
2023-07-13 07:22:08 -04:00
|
|
|
extend: {
|
|
|
|
colors: {
|
|
|
|
...themeColors,
|
|
|
|
},
|
|
|
|
},
|
2022-11-22 09:06:08 +11:00
|
|
|
},
|
2023-07-31 06:33:10 -04:00
|
|
|
darkMode: 'class',
|
2023-08-28 20:31:49 -04:00
|
|
|
plugins: [
|
|
|
|
require('@headlessui/tailwindcss'),
|
|
|
|
],
|
2022-11-22 09:06:08 +11:00
|
|
|
}
|