Skip to content

Commit 69d4d60

Browse files
committed
Merge pull request #2401 from SomMeri/interpolate-pseudo-selector-1294
Allow selector interpolation inside pseudoselectors. #1294
2 parents 3571cad + e064ac0 commit 69d4d60

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/less/parser/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ var Parser = function Parser(context, imports, fileInfo) {
862862
c = this.combinator();
863863

864864
e = parserInput.$re(/^(?:\d+\.\d+|\d+)%/) || parserInput.$re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/) ||
865-
parserInput.$char('*') || parserInput.$char('&') || this.attribute() || parserInput.$re(/^\([^()@]+\)/) || parserInput.$re(/^[\.#](?=@)/) ||
865+
parserInput.$char('*') || parserInput.$char('&') || this.attribute() || parserInput.$re(/^\([^()@]+\)/) || parserInput.$re(/^[\.#:](?=@)/) ||
866866
this.entities.variableCurly();
867867

868868
if (! e) {

test/css/selectors.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ p a span {
119119
.bloodred {
120120
color: green;
121121
}
122-
#blood.blood.red.black {
122+
#blood.blood.red.black:blood {
123123
color: black;
124124
}
125125
:nth-child(3) {

test/less/selectors.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ a {
117117
color: green;
118118
}
119119
.red {
120-
#@{theme}.@{theme}&.black {
120+
#@{theme}.@{theme}&.black:@{theme} {
121121
color:black;
122122
}
123123
}

0 commit comments

Comments
 (0)