more optimizations, execution is now split into eager (for main UI) and
lazy (for modals, popovers etc) parts
This commit is contained in:
parent
34e4dd0a79
commit
96e3a1593a
13 changed files with 156 additions and 51 deletions
|
|
@ -28,11 +28,17 @@ export const applyTheme = (input) => {
|
|||
// styleSheet.insertRule(`:root { ${rules.colors} }`, 'index-max')
|
||||
// styleSheet.insertRule(`:root { ${rules.shadows} }`, 'index-max')
|
||||
styleSheet.insertRule(`:root { ${rules.fonts} }`, 'index-max')
|
||||
themes3.css.forEach(rule => {
|
||||
console.log(rule)
|
||||
themes3.css(themes3.eager).forEach(rule => {
|
||||
styleSheet.insertRule(rule, 'index-max')
|
||||
})
|
||||
body.classList.remove('hidden')
|
||||
themes3.lazy.then(lazyRules => {
|
||||
themes3.css(lazyRules).forEach(rule => {
|
||||
styleSheet.insertRule(rule, 'index-max')
|
||||
})
|
||||
const t3 = performance.now()
|
||||
console.log('Themes 3 finalization took ' + (t3 - t2) + 'ms')
|
||||
})
|
||||
}
|
||||
|
||||
const configColumns = ({ sidebarColumnWidth, contentColumnWidth, notifsColumnWidth, emojiReactionsScale }) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue