Skip to content

Correctly serialize the <an+b> type #40

@gherkz

Description

@gherkz

I'm not 100% sure what the extra empty comments are for in the serializer (something about BAD_PAIRS it seems, whatever they are):

write('/**/')

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions