-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71ebdac
commit 56c5f68
Showing
17 changed files
with
177 additions
and
145 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
23 changes: 23 additions & 0 deletions
23
test/karma/test-app/css-variables/cmp-no-encapsulation.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,23 @@ | ||
:root { | ||
--font-weight: 800; | ||
} | ||
|
||
.black-local { | ||
--background: black; | ||
--color: white; | ||
|
||
background: var(--background); | ||
color: var(--color); | ||
} | ||
|
||
.black-global { | ||
background: var(--global-background); | ||
color: var(--global-color); | ||
font-weight: var(--font-weight); | ||
} | ||
|
||
.yellow-global { | ||
background: var(--link-background); | ||
color: black; | ||
} | ||
|
25 changes: 25 additions & 0 deletions
25
test/karma/test-app/css-variables/cmp-no-encapsulation.tsx
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,25 @@ | ||
import { Component, h, Host } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'css-variables-no-encapsulation', | ||
styleUrl: 'cmp-no-encapsulation.css' | ||
}) | ||
export class CssVariablesNoEncapsulation { | ||
|
||
render() { | ||
return ( | ||
<Host> | ||
<div class="black-local"> | ||
No encapsulation: Black background | ||
</div> | ||
<div class="black-global"> | ||
No encapsulation: Black background (global style) | ||
</div> | ||
<div class="yellow-global"> | ||
No encapsulation: Yellow background (global link) | ||
</div> | ||
</Host> | ||
); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
|
||
:host { | ||
--color: blue; | ||
--background: red; | ||
} | ||
|
||
:host(.set-green) { | ||
--background: green; | ||
} | ||
|
||
.inner-div { | ||
background: var(--background); | ||
color: var(--color); | ||
} | ||
|
||
.black-global { | ||
background: var(--global-background); | ||
color: var(--global-color); | ||
font-weight: var(--font-weight); | ||
} |
Oops, something went wrong.
56c5f68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm this does fix my test project with components that are set to shadow:false.