fix: custom rules not working
This commit is contained in:
@@ -41,37 +41,29 @@ export default defineConfig({
|
||||
}),
|
||||
],
|
||||
rules: [
|
||||
['w-screen', [['width', '100vw'], ['width', '100dvw']]],
|
||||
[/^w-(\d+)dvw$/, ([, d]) => {
|
||||
return [
|
||||
['width', `${d}vw`],
|
||||
['width', `${d}dvw`],
|
||||
];
|
||||
[/^(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`,
|
||||
};
|
||||
}],
|
||||
['min-w-screen', [['min-width', '100vw'], ['min-width', '100dvw']]],
|
||||
[/^min-w-(\d+)dvw$/, ([, d]) => {
|
||||
return [
|
||||
['min-width', `${d}vw`],
|
||||
['min-width', `${d}dvw`],
|
||||
];
|
||||
[/^text-stroke-(#?[A-z]+)/, ([,c]) => {
|
||||
console.log('HELLO WORLD');
|
||||
return {
|
||||
'-webkit-text-stroke-color': c,
|
||||
'text-stroke-color': c,
|
||||
};
|
||||
}],
|
||||
['h-screen', [['height', '100vh'], ['height', '100dvh']]],
|
||||
[/^h-(\d+)dvh$/, ([, d]) => {
|
||||
return [
|
||||
['height', `${d}vh`],
|
||||
['height', `${d}dvh`],
|
||||
];
|
||||
|
||||
[/^vertical-(lr|rl)/, ([, d]) => {
|
||||
return { 'writing-mode': `vertical-${d}` };
|
||||
}],
|
||||
['min-h-screen', [['min-height', '100vh'], ['min-height', '100dvh']]],
|
||||
[/^min-h-(\d+)dvh$/, ([, d]) => {
|
||||
return [
|
||||
['min-height', `${d}vh`],
|
||||
['min-height', `${d}dvh`],
|
||||
];
|
||||
}],
|
||||
['vertical-lr', [['writing-mode', 'vertical-lr']]],
|
||||
['vertical-rl', [['writing-mode', 'vertical-rl']]],
|
||||
['horizontal-tb', [['writing-mode', 'horizontal-tb']]],
|
||||
['horizontal-tb', { 'writing-mode': 'horizontal' }],
|
||||
],
|
||||
/* theme: {
|
||||
colors: {
|
||||
|
||||
Reference in New Issue
Block a user