mirror of https://github.com/sveltejs/svelte
fix: apply CSS custom properties with falsy values on components (#18634)
parent
135f4439c3
commit
7725f77cca
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: apply CSS custom properties with falsy values on components
|
||||
@ -0,0 +1 @@
|
||||
<div>Hello</div>
|
||||
@ -0,0 +1,12 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
ssrHtml: `<svelte-css-wrapper style="display: contents; --zero: 0; --one: 1;"><div>Hello</div></svelte-css-wrapper>`,
|
||||
|
||||
async test({ assert, target }) {
|
||||
assert.htmlEqual(
|
||||
target.innerHTML,
|
||||
`<svelte-css-wrapper style="display: contents; --zero: 0; --one: 1;"><div>Hello</div></svelte-css-wrapper>`
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
import Component from './Component.svelte';
|
||||
</script>
|
||||
|
||||
<Component --zero={0} --one={1} --empty={''} --nullish={null} />
|
||||
Loading…
Reference in new issue