postcss-jit-props
postcss-jit-props copied to clipboard
props changed in `@supports` aren't injected
To support @supports, new hooks need added to both the postcss plugin and OpenProps https://github.com/argyleink/open-props/issues/556. Follow the pattern that @media setup,
i started this work in a cloud IDE with ai code assist, and now it wont push my branch… i got the test written but havent found a solution:
const MockProps = {
…
'--gradient-space': '',
'--gradient-auto-hdr': 'linear-gradient(to right var(--gradient-space), #48005c, #8300e2)',
'--gradient-auto-hdr-@supports': '@supports (background: linear-gradient(to right in oklab, #000, #fff)) {:where(html) {--gradient-space: in oklab;}}',
}
it('Can jit @supports', async () => {
await run(
`:root {
background: var(--gradient-auto-hdr);
}`,
`:root {
--gradient-space: '';
--gradient-auto-hdr: linear-gradient(to right var(--gradient-space), #48005c, #8300e2);
background: var(--gradient-auto-hdr);
}
@supports (background: linear-gradient(to right in oklab, #000, #fff)) {
:root {
--gradient-space: in oklab;
}
}`,
MockProps
)
})