[Pkg-javascript-commits] [less.js] 37/58: Allow selector interpolation inside pseudoselectors. #1294
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:28:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v2.3.0
in repository less.js.
commit e064ac0ef205f9818378bfe38b73900b906605ee
Author: jurcovicovam <meri at meri.org>
Date: Tue Jan 20 16:08:02 2015 +0100
Allow selector interpolation inside pseudoselectors. #1294
---
lib/less/parser/parser.js | 2 +-
test/css/selectors.css | 2 +-
test/less/selectors.less | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/less/parser/parser.js b/lib/less/parser/parser.js
index f1cf119..f23b196 100644
--- a/lib/less/parser/parser.js
+++ b/lib/less/parser/parser.js
@@ -858,7 +858,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) {
diff --git a/test/css/selectors.css b/test/css/selectors.css
index 85f95b5..ed37035 100644
--- a/test/css/selectors.css
+++ b/test/css/selectors.css
@@ -119,7 +119,7 @@ p a span {
.bloodred {
color: green;
}
-#blood.blood.red.black {
+#blood.blood.red.black:blood {
color: black;
}
:nth-child(3) {
diff --git a/test/less/selectors.less b/test/less/selectors.less
index 42aa29e..2680fba 100644
--- a/test/less/selectors.less
+++ b/test/less/selectors.less
@@ -117,7 +117,7 @@ a {
color: green;
}
.red {
- #@{theme}.@{theme}&.black {
+ #@{theme}.@{theme}&.black:@{theme} {
color:black;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git
More information about the Pkg-javascript-commits
mailing list