mirror of
https://github.com/picocss/pico.git
synced 2025-04-27 03:36:13 -04:00
Support web components/shadow DOM.
Add :host to all uses of :root
This commit is contained in:
parent
6dc6489e69
commit
02c9fb69da
6 changed files with 14 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue