Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support web components/shadow DOM #641

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scss/colors/utilities/_css-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
$css-var-color-prefix: #{settings.$css-var-prefix}#{$color-property-name};

@if $enable-css-vars {
:root {
:root,
:host {
// Loop through color families
@each $family, $colors in colors.$colors {
@if index(map.get(settings.$palette, "color-families"), $family) {
Expand Down
3 changes: 2 additions & 1 deletion scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Modal (<dialog>)
*/

:root {
:root,
:host {
#{$css-var-prefix}scrollbar-width: 0px;
}

Expand Down
3 changes: 2 additions & 1 deletion scss/content/_embedded.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
}

// Hide the overflow in IE
#{$parent-selector} svg:not(:root) {
#{$parent-selector} svg:not(:root),
#{$parent-selector} svg:not(:host) {
overflow: hidden;
}
}
3 changes: 2 additions & 1 deletion scss/layout/_document.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
// 3. Use a 4-space tab width in all browsers (opinionated)
// 4. Remove the grey highlight on links in iOS (opinionated)
// 5. Prevent adjustments of font size after orientation changes in iOS
:where(:root) {
:where(:root),
:where(:host) {
-webkit-tap-highlight-color: transparent; // 4
-webkit-text-size-adjust: 100%; // 5
text-size-adjust: 100%; // 5
Expand Down
6 changes: 4 additions & 2 deletions scss/themes/default/_schemes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
// Light color scheme (Default)
// Can be forced with data-theme="light"
[data-theme="light"],
:root:not([data-theme="dark"]) {
:root:not([data-theme="dark"]),
:host(:not([data-theme="dark"])) {
@include light.theme;
}

// Dark color scheme (Auto)
// Automatically enabled if user has Dark mode enabled
@media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme]) {
:root:not([data-theme]),
:host(:not([data-theme])) {
@include dark.theme;
}
}
Expand Down
3 changes: 2 additions & 1 deletion scss/themes/default/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
* Styles
*/

:root {
:root,
:host {
// Typography
#{$css-var-prefix}font-family-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
"Noto Color Emoji";
Expand Down