-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 (#…
- Loading branch information
1 parent
72d493a
commit 8592914
Showing
4 changed files
with
20 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
9 changes: 9 additions & 0 deletions
9
packages/svelte/test/runtime/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,9 @@ | ||
export default { | ||
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/test/runtime/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> |