css-selector-parser
css-selector-parser copied to clipboard
:nth-child(even) gets quoted to :nth-child("even"), which is not valid css.
trafficstars
https://github.com/mdevils/node-css-selector-parser/blob/451a1fc5487a745c5dc32023986b63fe4bf0a7e4/src/css-selector-parser.coffee#L425
Thank you for your submission! Can you please make a Pull-request?
parser.render(parser.parse(':nth-child(even)'))
//=> ':nth-child("even")'
parser.registerSelectorPseudos('nth-child');
parser.render(parser.parse(':nth-child(even)'))
//=> ':nth-child(even)'
I guess this is not an issue with the parser per se, but rather with necessity of calling registerSelectorPseudos for each pseudo class. More extensive API docs could probably help.
Resolved in 2.0.0. Please update.