widgets: fix nested scoped css prioriry order
This commit is contained in:
parent
73666425b8
commit
41426c69ba
1 changed files with 3 additions and 3 deletions
|
|
@ -210,9 +210,9 @@ module.exports.widgets = function(data,parent) {
|
|||
widgetManager.addWidget(widgetInner)
|
||||
|
||||
if (scopedCss.length) {
|
||||
widgetContainer.addClass('css-scope-' + widgetInner.hash)
|
||||
scopedCss = scopedCss.split('${id}').join('.css-scope-' + widgetInner.hash + ' ')
|
||||
widgetContainer.append(`<style>${scopedCss}</style>`)
|
||||
widgetContainer.attr('id', 'widget-' + widgetInner.hash)
|
||||
scopedCss = scopedCss.split('${id}').join('#widget-' + widgetInner.hash + ' ')
|
||||
widgetContainer.prepend(`<style>${scopedCss}</style>`)
|
||||
}
|
||||
|
||||
// set widget's initial state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue