I'm not 100% sure what the extra empty comments are for in the serializer (something about BAD_PAIRS it seems, whatever they are):
These seem to get added in the following sample:
tinycss2.serialize(tinycss2.parse_stylesheet('div:nth-child(2n+1){}'))
Which results in
div:nth-child(2n/**/+1){}
This is clearly not the desired output. It would be nice if this feature was disabled by default. It could probably even be removed altogether - I can't imagine anyone is relying on these empty comments for anything.
I'm not 100% sure what the extra empty comments are for in the serializer (something about BAD_PAIRS it seems, whatever they are):
tinycss2/tinycss2/serializer.py
Line 111 in 0268a60
These seem to get added in the following sample:
Which results in
This is clearly not the desired output. It would be nice if this feature was disabled by default. It could probably even be removed altogether - I can't imagine anyone is relying on these empty comments for anything.