Skip to content

Commit 9c8bd0d

Browse files
committed
fix(preset-wind4): move test case to preset-wind4
1 parent 15a0082 commit 9c8bd0d

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

packages-engine/core/test/var-prefix.test.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/preset-wind4.test.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,32 @@ describe('preset-wind4', () => {
464464
"
465465
`)
466466
})
467+
468+
it('basic variable prefix', async () => {
469+
const uno = await createGenerator({
470+
presets: [
471+
presetWind4({
472+
variablePrefix: 'foo-',
473+
preflights: {
474+
reset: false,
475+
theme: false,
476+
property: true,
477+
},
478+
}),
479+
],
480+
})
481+
const { css } = await uno.generate('bg-white')
482+
expect(css).toMatchInlineSnapshot(`
483+
"/* layer: properties */
484+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--foo-bg-opacity:100%;}}
485+
@property --foo-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
486+
/* layer: default */
487+
.bg-white{background-color:color-mix(in srgb, var(--colors-white) var(--foo-bg-opacity), transparent);}
488+
@supports (color: color-mix(in lab, red, red)){
489+
.bg-white{background-color:color-mix(in oklab, var(--colors-white) var(--foo-bg-opacity), transparent);}
490+
}"
491+
`)
492+
})
467493
})
468494

469495
describe('important', () => {

0 commit comments

Comments
 (0)