css: add nth- pseudo class

This commit is contained in:
Pierre Tachoire
2024-03-25 08:50:57 +01:00
parent 9c997ec86d
commit db5d933285
4 changed files with 225 additions and 4 deletions

View File

@@ -711,7 +711,7 @@ pub const Parser = struct {
if (p.i >= p.s.len) return ParseError.ExpectedNthExpression;
const c = p.s[p.i];
if (std.ascii.isDigit(c)) {
const a = try p.parseInteger() * -1;
const a = try p.parseInteger();
return p.parseNthReadA(a);
}
if (c == 'n' or c == 'N') {