fixed oot selectors not working, added support for (webkit) scrollbars
This commit is contained in:
parent
3e198526e6
commit
13a289ac74
11 changed files with 214 additions and 23 deletions
|
|
@ -26,7 +26,21 @@ export const applyTheme = (input) => {
|
|||
styleSheet.toString()
|
||||
styleSheet.insertRule(`:root { ${rules.fonts} }`, 'index-max')
|
||||
themes3.css(themes3.eager).forEach(rule => {
|
||||
styleSheet.insertRule(rule, 'index-max')
|
||||
// Hack to support multiple selectors on same component
|
||||
if (rule.match(/::-webkit-scrollbar-button/)) {
|
||||
const parts = rule.split(/[{}]/g)
|
||||
const newRule = [
|
||||
parts[0],
|
||||
', ',
|
||||
parts[0].replace(/button/, 'thumb'),
|
||||
' {',
|
||||
parts[1],
|
||||
'}'
|
||||
].join('')
|
||||
styleSheet.insertRule(newRule, 'index-max')
|
||||
} else {
|
||||
styleSheet.insertRule(rule, 'index-max')
|
||||
}
|
||||
})
|
||||
body.classList.remove('hidden')
|
||||
themes3.lazy.then(lazyRules => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue