Skip to content

Commit

Permalink
Merge pull request #2401 from SomMeri/interpolate-pseudo-selector-1294
Browse files Browse the repository at this point in the history
Allow selector interpolation inside pseudoselectors. #1294
  • Loading branch information
lukeapage committed Jan 26, 2015
2 parents 3571cad + e064ac0 commit 69d4d60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/less/parser/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ var Parser = function Parser(context, imports, fileInfo) {
c = this.combinator();

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

if (! e) {
Expand Down
2 changes: 1 addition & 1 deletion test/css/selectors.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ p a span {
.bloodred {
color: green;
}
#blood.blood.red.black {
#blood.blood.red.black:blood {
color: black;
}
:nth-child(3) {
Expand Down
2 changes: 1 addition & 1 deletion test/less/selectors.less
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ a {
color: green;
}
.red {
#@{theme}.@{theme}&.black {
#@{theme}.@{theme}&.black:@{theme} {
color:black;
}
}
Expand Down

0 comments on commit 69d4d60

Please sign in to comment.