-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly handle falsy values of style directives in SSR mode
fixes #11044
- Loading branch information
1 parent
81517a5
commit 55b7354
Showing
4 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"svelte": patch | ||
--- | ||
|
||
fix: correctly handle falsy values of style directives in SSR mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/svelte/tests/runtime-legacy/samples/inline-style-directive-falsy-value/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
html: ` | ||
<p style="--a: 0;"></p> | ||
<p style="--b: false;"></p> | ||
<p></p> | ||
<p></p> | ||
<p></p> | ||
` | ||
}); |
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/runtime-legacy/samples/inline-style-directive-falsy-value/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<p style:--a={0}></p> | ||
<p style:--b={false}></p> | ||
<p style:--c=""></p> | ||
<p style:--d={undefined}></p> | ||
<p style:--e={null}></p> |