44 lines
968 B
TypeScript
Executable file
44 lines
968 B
TypeScript
Executable file
import { defineConfig } from "windicss/helpers"
|
|
import colors from "windicss/colors"
|
|
import lineClampPlugin from "windicss/plugin/line-clamp"
|
|
|
|
const generateValues = (max: number, fn: (step: number) => any) => {
|
|
const object: Record<number, any> = {}
|
|
|
|
for (let i = 1; i <= max; i++) {
|
|
object[i] = fn(i)
|
|
}
|
|
|
|
return object
|
|
}
|
|
|
|
export default defineConfig({
|
|
theme: {
|
|
colors: {
|
|
black: colors.black,
|
|
white: colors.white,
|
|
gray: colors.stone,
|
|
red: colors.red,
|
|
yellow: colors.amber,
|
|
orange: colors.orange,
|
|
green: colors.green,
|
|
blue: colors.blue,
|
|
violet: colors.fuchsia,
|
|
light: colors.light,
|
|
dark: colors.dark,
|
|
transparent: colors.transparent
|
|
},
|
|
fontSize: {
|
|
...generateValues(30, step => `${step * 0.25}rem`),
|
|
4: "1.2rem",
|
|
3: "1.1rem",
|
|
2: "1rem",
|
|
s1: "0.9rem",
|
|
s2: "0.8rem",
|
|
s3: "0.7rem"
|
|
}
|
|
},
|
|
plugins: [
|
|
lineClampPlugin
|
|
]
|
|
})
|