tinycss2 is a low-level CSS parser and generator written in Python. It can parse CSS strings, return objects representing tokens and blocks, and generate CSS strings from these objects. Based on the CSS Syntax Level 3 specification, it handles the grammar of CSS but does not know specific rules, properties, or values. It is actively maintained with regular releases.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Primary function for parsing full CSS stylesheets.
While often not directly imported, AST node classes reside in the `tinycss2.ast` module for inspection and manipulation of parsed output.
Parses a CSS string into an Abstract Syntax Tree (AST) of tokens and blocks, then iterates through the parsed rules and declarations.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.