Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

README

cssutils: CSS Cascading Style Sheets library for Python

Copyright:

2004-2010 Christof Hoeke

Overview

A Python package to parse and build CSS Cascading Style Sheets. DOM only, not any rendering facilities!

Based upon and partly implementing the following specifications :

CSS 2.1rev1

General CSS rules and properties are defined here

CSS3 Module: Syntax

Used in parts since cssutils 0.9.4. cssutils tries to use the features from CSS 2.1 and CSS 3 with preference to CSS3 but as this is not final yet some parts are from CSS 2.1

CSS Fonts Module Level 3

Added changes and additional stuff (since cssutils v0.9.6)

MediaQueries

MediaQueries are part of stylesheets.MediaList since v0.9.4, used in @import and @media rules.

Namespaces

Added in v0.9.1, updated to definition in CSSOM in v0.9.4, updated in 0.9.5 for dev version

Selectors

The selector syntax defined here (and not in CSS 2.1) should be parsable with cssutils (should mind though ;) )

Variables

Experimental specification of CSS Variables. Currently in development in cssutils.

DOM Level 2 Style CSS

DOM for package css

DOM Level 2 Style Stylesheets

DOM for package stylesheets

CSSOM

A few details (mainly the NamespaceRule DOM) is taken from here. Plan is to move implementation to the stuff defined here which is newer but still no REC so might change anytime…

The cssutils tokenizer is a customized implementation of CSS3 Module: Syntax (W3C Working Draft 13 August 2003) which itself is based on the CSS 2.1 tokenizer. It tries to be as compliant as possible but uses some (helpful) parts of the CSS 2.1 tokenizer.

I guess cssutils is neither CSS 2.1 nor CSS 3 compliant but tries to at least be able to parse both grammars including some more real world cases (some CSS hacks are actually parsed and serialized). Both official grammars are not final nor bugfree but still feasible. cssutils aim is not to be fully compliant to any CSS specification (the specifications seem to be in a constant flow anyway) but cssutils should be able to read and write as many as possible CSS stylesheets “in the wild” while at the same time implement the official APIs which are well documented. Some minor extensions are provided as well.

Please visit http://cthedot.de/cssutils/ or http://code.google.com/p/cssutils/ for more details.

There is also a low-traffic cssutils discussion group.

Compatibility

cssutils is developed on standard Python. Since 0.9.6 all tests pass on Jython (2.5.1) too.

License

Copyright 2005 - 2010 Christof Hoeke

cssutils is published under the LGPL 3 or later

cssutils is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

cssutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with cssutils. If not, see http://www.gnu.org/licenses.

Installation

From 0.9.6 cssutils uses Distribute

After installing Distribute use:

> easy_install cssutils

to install the latest version of cssutils.

Alternatively download the provided source distribution. Expand the file and from a command line install with:

> python setup.py install

To uninstall remove any registrations of cssutils eggs with Distribute and remove the eggs which should be installed at PYTHONDIR/Lib/site-packages/cssutils too.

Kind Request

cssutils is far from being perfect or even complete. If you find any bugs (especially specification violations) or have problems or suggestions please put them in the Issue Tracker at Google.

Thanks

Thanks to Walter Doerwald for patches, help and discussion. Thanks to Kevin D. Smith for the value validating module. Thanks also to Jason R. Coombs, Cory Dodt, Tim Gerla and James Dobson for helpful suggestions and code patches.

Metadata

Release files for cssutils 0.9.7a6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cssutils 0.9.7a6
File Size Uploaded Provenance Actions
cssutils-0.9.7a6.zip 543.7 kB Without provenance Details for cssutils-0.9.7a6.zip

Built distributions (wheels)

Table of built distributions (wheels) for cssutils 0.9.7a6
File Actions
cssutils-0.9.7a6.win-amd64.exe Details for cssutils-0.9.7a6.win-amd64.exe
cssutils-0.9.7a6-py2.6.egg Legacy Egg format - - Details for cssutils-0.9.7a6-py2.6.egg
cssutils-0.9.7a6-py2.5.egg Legacy Egg format - - Details for cssutils-0.9.7a6-py2.5.egg
cssutils-0.9.7a6-py2.4.egg Legacy Egg format - - Details for cssutils-0.9.7a6-py2.4.egg

Total release size: 2.0 MB

Release files / cssutils-0.9.7a6.zip

Download URL cssutils-0.9.7a6.zip
Size 543.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fc4d2d9419b12544cbef1417c628f27b88416d63cba36e76e2c24e20e849b6c4
BLAKE2b-256 checksum
How to use checksums
dbc5d70df38f74d9641b2441ec6369c6c9ede7021d4a6a15825c586b03953aa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cssutils-0.9.7a6.win-amd64.exe

Download URL cssutils-0.9.7a6.win-amd64.exe
Size 399.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2e0be068d7cb720e9910e07d644955d4bd4918b1d9500aaddb60a204e7194c5f
BLAKE2b-256 checksum
How to use checksums
3aedb41a62febdb937a2c4f50984722197e586eaeedd3c4e345f057c7e23948f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cssutils-0.9.7a6-py2.6.egg

Download URL cssutils-0.9.7a6-py2.6.egg
Size 359.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
ca70b5e58283ae1171dd19bc4694ec484a7e36bae018f7698dcc62b525903b82
BLAKE2b-256 checksum
How to use checksums
37ed4178f3e560d0fb9166f25c3f2a43e47cb8bbf7285c8fea822df6030c7cfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cssutils-0.9.7a6-py2.5.egg

Download URL cssutils-0.9.7a6-py2.5.egg
Size 360.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
90e42a55a8f406f7dfc13a412fa8aa6531d714ba2078617156ebd0e4c8ab84e9
BLAKE2b-256 checksum
How to use checksums
5f04b6486c6e57575ec091af48fcc32b78fc29c15de743b015978c27b74176b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cssutils-0.9.7a6-py2.4.egg

Download URL cssutils-0.9.7a6-py2.4.egg
Size 357.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
98e657ad743eebe1fddd13477f1377deb0f18574af58460b9b551fd0951a1fc7
BLAKE2b-256 checksum
How to use checksums
1e9680fb840a9dc146dcd86b7b9143e5d82318011adae0ac74a72d582842ef80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cssutils 0.9.7a6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.7a5

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page