Files
keikos.work/uno.config.js

87 lines
1.7 KiB
JavaScript
Raw Normal View History

2024-12-11 19:52:14 -03:00
import {
2024-12-13 17:30:28 -03:00
defineConfig,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss';
2024-12-11 19:52:14 -03:00
export default defineConfig({
2024-12-13 17:30:28 -03:00
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: [
2024-12-16 14:17:21 -03:00
[/^(min-|max-)?(w|h)-screen/, ([, m, d]) => [
[`${m || ''}${d == 'w' ? 'width' : 'height'}`, `100v${d}`],
[`${m || ''}${d == 'w' ? 'width' : 'height'}`, `100dv${d}`],
]],
[/^text-stroke-(\d+)px/, ([,d]) => {
return {
'-webkit-text-stroke-width': `${d}px`,
'text-stroke-width': `${d}px`,
};
2024-12-13 17:30:28 -03:00
}],
2024-12-16 14:17:21 -03:00
[/^text-stroke-(#?[A-z]+)/, ([,c]) => {
console.log('HELLO WORLD');
return {
'-webkit-text-stroke-color': c,
'text-stroke-color': c,
};
2024-12-13 17:30:28 -03:00
}],
2024-12-16 14:17:21 -03:00
[/^vertical-(lr|rl)/, ([, d]) => {
return { 'writing-mode': `vertical-${d}` };
2024-12-13 17:30:28 -03:00
}],
2024-12-16 14:17:21 -03:00
['horizontal-tb', { 'writing-mode': 'horizontal' }],
2024-12-13 17:30:28 -03:00
],
/* theme: {
2024-12-11 19:52:14 -03:00
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)',
},
},
}, */
2024-12-13 17:30:28 -03:00
transformers: [transformerDirectives(), transformerVariantGroup()],
2024-12-11 19:52:14 -03:00
});