Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.
This repository was archived by the owner on Sep 18, 2019. It is now read-only.

Preserve invalid/ignored tokens for minifiers #2

@SimonSapin

Description

@SimonSapin

Currently tinycss just drops tokens for invalid declarations or rules. This is fine for an UA like WeasyPrint, but not for a minifier: what is invalid now may become valid in the future. A minifier should pass it through and not drop it.

To enable this, tinycss should get a "preserve invalid" mode (off by defaut) where:

  • Any list of Declaration objects can also contain InvalidDeclaration objects which have a TokenList
  • Any list that can contain at-rules can also contain unparsed AtRule objects whose head and body attributes are TokenList’s

The precise API is still to be determined

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