fix dialogs not having styles at all
This commit is contained in:
parent
7d1e787f55
commit
1b391b6a69
@ -1,7 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'MobileDrawer',
|
name: 'MobileDrawer',
|
||||||
selector: '.mobile-drawer',
|
selector: '.mobile-drawer',
|
||||||
lazy: true,
|
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
'Text',
|
'Text',
|
||||||
'Link',
|
'Link',
|
||||||
|
@ -26,7 +26,7 @@ export const applyTheme = async (input) => {
|
|||||||
const styleSheet = styleEl.sheet
|
const styleSheet = styleEl.sheet
|
||||||
|
|
||||||
getCssRules(themes3.eager, themes3.staticVars).forEach(rule => {
|
getCssRules(themes3.eager, themes3.staticVars).forEach(rule => {
|
||||||
// Hack to support multiple selectors on same component
|
// Hacks to support multiple selectors on same component
|
||||||
if (rule.match(/::-webkit-scrollbar-button/)) {
|
if (rule.match(/::-webkit-scrollbar-button/)) {
|
||||||
const parts = rule.split(/[{}]/g)
|
const parts = rule.split(/[{}]/g)
|
||||||
const newRule = [
|
const newRule = [
|
||||||
@ -57,7 +57,20 @@ export const applyTheme = async (input) => {
|
|||||||
const chunk = chunks[counter]
|
const chunk = chunks[counter]
|
||||||
Promise.all(chunk.map(x => x())).then(result => {
|
Promise.all(chunk.map(x => x())).then(result => {
|
||||||
getCssRules(result.filter(x => x), themes3.staticVars).forEach(rule => {
|
getCssRules(result.filter(x => x), themes3.staticVars).forEach(rule => {
|
||||||
|
if (rule.match(/\.modal-view/)) {
|
||||||
|
const parts = rule.split(/[{}]/g)
|
||||||
|
const newRule = [
|
||||||
|
parts[0],
|
||||||
|
', ',
|
||||||
|
parts[0].replace(/\.modal-view/, '#modal'),
|
||||||
|
' {',
|
||||||
|
parts[1],
|
||||||
|
'}'
|
||||||
|
].join('')
|
||||||
|
styleSheet.insertRule(newRule, 'index-max')
|
||||||
|
} else {
|
||||||
styleSheet.insertRule(rule, 'index-max')
|
styleSheet.insertRule(rule, 'index-max')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// const t1 = performance.now()
|
// const t1 = performance.now()
|
||||||
// console.debug('Chunk ' + counter + ' took ' + (t1 - t0) + 'ms')
|
// console.debug('Chunk ' + counter + ' took ' + (t1 - t0) + 'ms')
|
||||||
|
Loading…
Reference in New Issue
Block a user