mirror of
https://github.com/picocss/pico.git
synced 2025-04-21 00:56:14 -04:00
Improvements
- Edit code colors and add a color for comments - Add ::selection - Small edits for cards: last-child and overflow - Add card-sectioning (header, footer, pre) - Change global hue for Primary color - Remove border for pre - Add querySelectorAll() for theme-switcher.js - Update docs
This commit is contained in:
parent
c3f9d8d8c8
commit
85e21d35de
23 changed files with 937 additions and 422 deletions
|
@ -19,7 +19,7 @@
|
|||
off: '<i>Turn off dark mode</i>'
|
||||
},
|
||||
target: 'body', // Button append in target
|
||||
selector: 'button.theme-switcher', // Button selector in Dom
|
||||
selector: 'button.theme-switcher', // Button selector in Dom
|
||||
currentTheme: systemColorScheme()
|
||||
};
|
||||
|
||||
|
@ -101,8 +101,11 @@
|
|||
|
||||
// Apply theme
|
||||
document.querySelector('html').setAttribute('data-theme', set);
|
||||
document.querySelector(switcher.selector).innerHTML = label;
|
||||
document.querySelector(switcher.selector).setAttribute('aria-label', stripTags(label));
|
||||
var switchers = document.querySelectorAll(switcher.selector);
|
||||
for (var i = 0; i < switchers.length; i++) {
|
||||
switchers[i].innerHTML = label;
|
||||
switchers[i].setAttribute('aria-label', stripTags(label));
|
||||
}
|
||||
switcher.currentTheme = set;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue