Kozea/tinycss2

A tiny CSS parser

Python

191

404 commits

updated Oct 1, 2026

See the code

README

tinycss2 is a low-level CSS parser and generator written in Python: it can
parse strings, return objects representing tokens and blocks, and generate CSS
strings corresponding to these objects.

Based on the CSS Syntax Level 3 specification, tinycss2 knows the grammar of
CSS but doesn't know specific rules, properties or values supported in various
CSS modules.

* Free software: BSD license
* For Python 3.10+, tested on CPython and PyPy
* Documentation: https://doc.courtbouillon.org/tinycss2
* Changelog: https://github.com/Kozea/tinycss2/releases
* Code, issues, tests: https://github.com/Kozea/tinycss2
* Code of conduct: https://www.courtbouillon.org/code-of-conduct
* Professional support: https://www.courtbouillon.org
* Donation: https://opencollective.com/courtbouillon

tinycss2 has been created and developed by Kozea (https://kozea.fr).
Professional support, maintenance and community management is provided by
CourtBouillon (https://www.courtbouillon.org).

Copyrights are retained by their contributors, no copyright assignment is
required to contribute to tinycss2. Unless explicitly stated otherwise, any
contribution intentionally submitted for inclusion is licensed under the BSD
3-clause license, without any additional terms or conditions. For full
authorship information, see the version control history.

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

css
parser
python

Project health

Overall

4.9/10

Maintained

9/10

Code review

2/10
OpenSSF Scorecard

Latest release

1.5.1 · Nov 23, 2025

Releases this year

2

Significant stargazers

Dan Yeaw

188 followers · starred Aug 2020

BD103

69 followers · starred Oct 2021

Rafał Pitoń

279 followers · starred Jul 2024

Fang-Pen Lin

654 followers · starred Jul 2026

Kozea/tinycss2

A tiny CSS parser

Python

191

404 commits

updated Oct 1, 2026

See the code

README

tinycss2 is a low-level CSS parser and generator written in Python: it can
parse strings, return objects representing tokens and blocks, and generate CSS
strings corresponding to these objects.

Based on the CSS Syntax Level 3 specification, tinycss2 knows the grammar of
CSS but doesn't know specific rules, properties or values supported in various
CSS modules.

* Free software: BSD license
* For Python 3.10+, tested on CPython and PyPy
* Documentation: https://doc.courtbouillon.org/tinycss2
* Changelog: https://github.com/Kozea/tinycss2/releases
* Code, issues, tests: https://github.com/Kozea/tinycss2
* Code of conduct: https://www.courtbouillon.org/code-of-conduct
* Professional support: https://www.courtbouillon.org
* Donation: https://opencollective.com/courtbouillon

tinycss2 has been created and developed by Kozea (https://kozea.fr).
Professional support, maintenance and community management is provided by
CourtBouillon (https://www.courtbouillon.org).

Copyrights are retained by their contributors, no copyright assignment is
required to contribute to tinycss2. Unless explicitly stated otherwise, any
contribution intentionally submitted for inclusion is licensed under the BSD
3-clause license, without any additional terms or conditions. For full
authorship information, see the version control history.

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

css
parser
python

Project health

Overall

4.9/10

Maintained

9/10

Code review

2/10
OpenSSF Scorecard

Latest release

1.5.1 · Nov 23, 2025

Releases this year

2

Significant stargazers

Dan Yeaw

188 followers · starred Aug 2020

BD103

69 followers · starred Oct 2021

Rafał Pitoń

279 followers · starred Jul 2024

Fang-Pen Lin

654 followers · starred Jul 2026