Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed for (n+1) not working

  • Loading branch information...
commit 651f5a5d0270847ecd3b05762d6ea81a4a3ee22f 1 parent 55c9970
cloudhead authored
View
2  lib/less/engine/grammar/less.tt
@@ -254,7 +254,7 @@ module Less
# div / .class / #id / input[type="text"] / lang(fr)
#
rule element
- ((class / id / tag / ident) attribute* ('(' ([a-zA-Z]+ / pseudo_exp / selector / [0-9]+) ')')?)+
+ ((class / id / tag / ident) attribute* ('(' [a-zA-Z]+ ')' / '(' (pseudo_exp / selector / [0-9]+) ')' )?)+
/ attribute+ / '@media' / '@font-face'
end
View
1  spec/css/css-3.css
@@ -15,6 +15,7 @@ ul.comma > li:not(:only-child)::after { color: white; }
ol.comma > li:nth-last-child(2)::after { color: white; }
li:nth-child(4n+1) { color: white; }
li:nth-child(-5n) { color: white; }
+li:nth-child(n+1) { color: white; }
li:nth-child(-n+2) { color: white; }
a[href^="http://"], a[href$="http://"] { color: black; }
p::before { color: black; }
View
1  spec/less/css-3.less
@@ -34,6 +34,7 @@ ol.comma > li:nth-last-child(2)::after {
li:nth-child(4n+1),
li:nth-child(-5n),
+li:nth-child(n+1),
li:nth-child(-n+2) {
color: white;
}
Please sign in to comment.
Something went wrong with that request. Please try again.