Skip to content

Commit

Permalink
fixed for (n+1) not working
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jan 13, 2010
1 parent 55c9970 commit 651f5a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/less/engine/grammar/less.tt
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions spec/css/css-3.css
Expand Up @@ -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; }
1 change: 1 addition & 0 deletions spec/less/css-3.less
Expand Up @@ -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;
}
Expand Down

0 comments on commit 651f5a5

Please sign in to comment.