You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extend does not ignore meaningless spaces in pseudoclasses parameters #1579
Pseudoclasses parameters inside extend must match perfectly. The extend expression :extend(:lang( en )) will not match selector without spaces :lang(en).
Sample input:
:lang(en) {
lang: en;
}
.spacedLang:extend(:lang( en )){}
Actual output:
:lang(en) {
lang: en;
}
Expected output:
:lang(en),
.spacedLang {
lang: en;
}
Longer test case with multiple parameters types:
:lang(en) {
lang: en;
}
:lang( en ) {
lang: spaced en;
}
.lang:extend(:lang(en)){}
.spacedLang:extend(:lang( en )){}
:nth-child(even) {
nth: no spaces even;
}
:nth-child( even ) {
nth: spaces even;
}
.even:extend(:nth-child(even)){}
.spacedEven:extend(:nth-child( even )){}
:nth-child(2n+1) {
nth: no spaces even;
}
:nth-child(2n + 1) {
nth: spaces even;
}
.nth:extend(:nth-child(2n+1)){}
.spacedNth:extend(:nth-child(2n + 1)){}
There are 2 problems - the one fixed in #1580 and the fact that we just parse everything in a selector inside parenthesis as text - no node processing.
Activity
lukeapage commentedon Oct 15, 2013
There are 2 problems - the one fixed in #1580 and the fact that we just parse everything in a selector inside parenthesis as text - no node processing.
I made a possible fix that fixes most of the bug
253dd99
but...