mirror of
https://github.com/picocss/pico.git
synced 2025-04-23 01:46:14 -04:00
Merge pull request #16 from rcoup/web-components-host
Support web components/shadow DOM.
This commit is contained in:
commit
5d2e82ddaf
6 changed files with 14 additions and 7 deletions
|
@ -10,7 +10,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 list.index(map.get(settings.$palette, "color-families"), $family) {
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
* Modal (<dialog>)
|
||||
*/
|
||||
|
||||
:root {
|
||||
:root,
|
||||
:host {
|
||||
#{$css-var-prefix}scrollbar-width: 0px;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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