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:
Lucas 2019-12-01 16:35:38 +07:00
parent c3f9d8d8c8
commit 85e21d35de
23 changed files with 937 additions and 422 deletions

File diff suppressed because one or more lines are too long

View file

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