Files
keikos.work/uno.config.js

92 lines
1.9 KiB
JavaScript
Raw Normal View History

2024-12-11 19:52:14 -03:00
import {
defineConfig,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from "unocss";
export default defineConfig({
cli: {
entry: {
outFile: "./assets/css/uno.css",
patterns: [
"./{templates,handlers}/**/*.templ",
"./assets/**/*.{js,css,html}",
"!./assets/css/uno.css",
],
},
},
presets: [
presetIcons(),
presetTypography(),
presetUno({
dark: "media",
}),
presetWebFonts({
fonts: {
japanese: {
name: "Kaisei Decol",
},
sans: {
name: "Quattrocento Sans",
},
serif: {
name: "Quattrocento",
},
},
provider: "none",
}),
],
rules: [
["w-screen", [["width", "100vw"], ["width", "100dvw"]]],
[/^w-(\d+)dvw$/, ([_, d]) => {
return [
["width", `${d}vw`],
["width", `${d}dvw`],
];
}],
["min-w-screen", [["width", "100vw"], ["width", "100dvw"]]],
[/^w-(\d+)dvw$/, ([_, d]) => {
return [
["min-width", `${d}vw`],
["min-width", `${d}dvw`],
];
}],
["h-screen", [["height", "100vh"], ["height", "100dvh"]]],
[/^h-(\d+)dvh$/, ([_, d]) => {
return [
["height", `${d}vh`],
["height", `${d}dvh`],
];
}],
["min-h-screen", [["height", "100vh"], ["height", "100dvh"]]],
[/^h-(\d+)dvh$/, ([_, d]) => {
return [
["min-height", `${d}vh`],
["min-height", `${d}dvh`],
];
}],
],
/* theme: {
colors: {
white: 'var(--white)',
black: 'var(--black)',
cyan: 'var(--cyan)',
purple: 'var(--purple)',
foreground: {
'00': 'var(--foreground-00)',
},
background: {
'00': 'var(--background-00)',
},
accent: {
'00': 'var(--accent-00)',
},
},
}, */
transformers: [transformerDirectives(), transformerVariantGroup()],
});