mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
Keep prefix attribute selectors while shimming (#525)
ShadowCSS converts all prefix attribute selectors `[attr^=value]` to exact selectors `[attr=value]`. The bug was caused due to a bad regular expression which intended to remove `^`s. To maintain status quo but fix the issue, I have simply put in a negative look-ahead for `=`.
This commit is contained in:
@@ -586,7 +586,7 @@ var selectorRe = /([^{]*)({[\s\S]*?})/gim,
|
||||
/\/shadow\//g, // former ::shadow
|
||||
/\/shadow-deep\//g, // former /deep/
|
||||
/\^\^/g, // former /shadow/
|
||||
/\^/g // former /shadow-deep/
|
||||
/\^(?!=)/g // former /shadow-deep/
|
||||
];
|
||||
|
||||
function stylesToCssText(styles, preserveComments) {
|
||||
|
||||
Reference in New Issue
Block a user