selectors: Don't serialize :nth-child(-n) as -1n.

This commit is contained in:
Emilio Cobos Álvarez 2018-04-07 12:57:32 +02:00
parent ecf71d77cd
commit 1eab5927a5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 1 additions and 25 deletions

View file

@ -1021,6 +1021,7 @@ impl<Impl: SelectorImpl> ToCss for Component<Impl> {
(0, 0) => dest.write_char('0'),
(1, 0) => dest.write_char('n'),
(-1, 0) => dest.write_str("-n"),
(_, 0) => write!(dest, "{}n", a),
(0, _) => write!(dest, "{}", b),