ANN: cssutils 0.9.4b1

Christof Hoeke cthedot at
Sat Dec 29 17:50:40 CET 2007

what is it
A Python package to parse and build CSS Cascading Style Sheets.

main changes since 0.9.4a4
for full details for 0.9.4b1 see the relevant CHANGELOG:

     - **FEATURE**: Added ``csscombine`` script which currently resolves 
@import rules into the input sheet. No nested @imports are resolved yet 
and @namespace rules do not work yet though!

     + **BUGFIX**: Serializing escape sequences add a single SPACE after 
each escape. This was not present until now so a sequence like "\\74 a" 
did come out as "\\000074a" which was not as intended. Also as a SPACE 
is inserted in any case all escapes are not padded to 6 digits anymore 
but are only as long as needed.

     + **BUGFIX**: Handling of illegal selectors is now same as the W3C 
CSS validator (and according the selector spec - I hope ;). Illegal 
selectors result the complete rule being dropped. Fixed are the 
following (edge) cases:

         Meant was probably a space between a and b (plus maybe the 
comment) but it MUST be inserted. IE and Safari nevertheless seem to 
parse this rule as ``a b`` so as if a space would be present. cssutils 
now parses this selector as intented by the spec as ``ab``.
         Again spaces around the UNIVERSAL ``*`` were probably meant by 
the author. IE and Safari seem to parse this **invalid** selector as ``a 
b``. cssutils ignores this rule completely!

     + BUGFIX: ``css.CSSRuleList`` is still a Python list but setting 
methods like ``__init__``, ``append``,     ``extend`` or 
``__setslice__`` are added later on instances of this class if so 
desired. E.g. CSSStyleSheet adds ``append`` which is not available in a 
simple instance of this class! This has been changed as no validation is 
possible in CSSRuleList itself.

     + IMPROVEMENT: Added better ``str`` and ``repr`` to 

     + IMPROVEMENT: Added position information to some error reportings 
(Property, CSSMediaRule

     + some internal changes

cssutils is published under the LGPL.

for download options for see

cssutils needs Python 2.4 or higher (tested with Python 2.5 on Vista only)

bug reports, comments, etc are very much appreciated!

thanks, Christof

More information about the Python-announce-list mailing list