Skip to content

Commit

Permalink
Merge pull request #1570 from MSamman/Percent_As_Attribute
Browse files Browse the repository at this point in the history
proposed solution to #1568: percentage as attribute
  • Loading branch information
lukeapage committed Oct 4, 2013
2 parents 1a184d5 + abe09a2 commit dc367f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/less/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ less.Parser = function Parser(env) {
}

if ((op = $(/^[|~*$^]?=/))) {
val = $(this.entities.quoted) || $(/^[\w-]+/) || $(this.entities.variableCurly);
val = $(this.entities.quoted) || $(/^[0-9]+%/) || $(/^[\w-]+/) || $(this.entities.variableCurly);
}

expect(']');
Expand Down
1 change: 1 addition & 0 deletions test/css/selectors.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ p a span {
color: #ff0000;
}
[prop],
[prop=10%],
[prop="value3"],
[prop*="val3"],
[|prop~="val3"],
Expand Down
1 change: 1 addition & 0 deletions test/less/selectors.less
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ a {
}
}
[prop],
[prop=10%],
[prop="value@{num}"],
[prop*="val@{num}"],
[|prop~="val@{num}"],
Expand Down

0 comments on commit dc367f6

Please sign in to comment.