mirror of
https://github.com/atom/atom.git
synced 2026-02-13 08:04:56 -05:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user