-
-
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.
Browse files
Browse the repository at this point in the history
add cascade option, to prevent components inheriting styles
- Loading branch information
Showing
18 changed files
with
203 additions
and
23 deletions.
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
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
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
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
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
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
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
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
13 changes: 13 additions & 0 deletions
13
test/css/samples/cascade-false-global-keyframes/expected.css
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,13 @@ | ||
|
||
@keyframes why { | ||
0% { color: red; } | ||
100% { color: blue; } | ||
} | ||
|
||
[svelte-2486527405].animated, [svelte-2486527405] .animated { | ||
animation: why 2s; | ||
} | ||
|
||
[svelte-2486527405].also-animated, [svelte-2486527405] .also-animated { | ||
animation: not-defined-here 2s; | ||
} |
17 changes: 17 additions & 0 deletions
17
test/css/samples/cascade-false-global-keyframes/input.html
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,17 @@ | ||
<div class='animated'>animated</div> | ||
<div class='also-animated'>also animated</div> | ||
|
||
<style> | ||
@keyframes -global-why { | ||
0% { color: red; } | ||
100% { color: blue; } | ||
} | ||
|
||
.animated { | ||
animation: why 2s; | ||
} | ||
|
||
.also-animated { | ||
animation: not-defined-here 2s; | ||
} | ||
</style> |
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,3 @@ | ||
export default { | ||
cascade: false | ||
}; |
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,12 @@ | ||
|
||
div { | ||
color: red; | ||
} | ||
|
||
div.foo { | ||
color: blue; | ||
} | ||
|
||
.foo { | ||
font-weight: bold; | ||
} |
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,16 @@ | ||
<div>red</div> | ||
<div class='foo'>bold/blue</div> | ||
|
||
<style> | ||
:global(div) { | ||
color: red; | ||
} | ||
|
||
:global(div.foo) { | ||
color: blue; | ||
} | ||
|
||
:global(.foo) { | ||
font-weight: bold; | ||
} | ||
</style> |
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,13 @@ | ||
|
||
@keyframes svelte-776829126-why { | ||
0% { color: red; } | ||
100% { color: blue; } | ||
} | ||
|
||
[svelte-776829126].animated, [svelte-776829126] .animated { | ||
animation: svelte-776829126-why 2s; | ||
} | ||
|
||
[svelte-776829126].also-animated, [svelte-776829126] .also-animated { | ||
animation: not-defined-here 2s; | ||
} |
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,17 @@ | ||
<div class='animated'>animated</div> | ||
<div class='also-animated'>also animated</div> | ||
|
||
<style> | ||
@keyframes why { | ||
0% { color: red; } | ||
100% { color: blue; } | ||
} | ||
|
||
.animated { | ||
animation: why 2s; | ||
} | ||
|
||
.also-animated { | ||
animation: not-defined-here 2s; | ||
} | ||
</style> |
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,3 @@ | ||
export default { | ||
cascade: false | ||
}; |
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,12 @@ | ||
|
||
div[svelte-4161687011] { | ||
color: red; | ||
} | ||
|
||
div.foo[svelte-4161687011] { | ||
color: blue; | ||
} | ||
|
||
.foo[svelte-4161687011] { | ||
font-weight: bold; | ||
} |
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,16 @@ | ||
<div>red</div> | ||
<div class='foo'>bold/blue</div> | ||
|
||
<style> | ||
div { | ||
color: red; | ||
} | ||
|
||
div.foo { | ||
color: blue; | ||
} | ||
|
||
.foo { | ||
font-weight: bold; | ||
} | ||
</style> |