Preserve specificity when transforming atom-text-editor::shadow

Simply replace ::shadow with .editor to preserve the specificity of the
transformed rule. This isn't beautiful, but it's the only way to
guarantee that the styling transition is smooth enough to justify not
bumping the major.
This commit is contained in:
Nathan Sobo
2016-11-01 10:56:09 -06:00
parent daf790406f
commit 4ccd700871
2 changed files with 10 additions and 8 deletions

View File

@@ -270,7 +270,8 @@ function transformDeprecatedShadowDOMSelectors (css, context) {
}
} else {
if (previousNodeIsAtomTextEditor && node.type === 'pseudo' && node.value === '::shadow') {
selector.removeChild(node)
node.type = 'className'
node.value = '.editor'
targetsAtomTextEditorShadow = true
}
}