Merge pull request #16 from rcoup/web-components-host

Support web components/shadow DOM.
This commit is contained in:
JWB 2024-12-03 09:14:58 -05:00 committed by GitHub
commit 5d2e82ddaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 7 deletions

View file

@ -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;
}
}

View file

@ -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";