ANN: cssutils 0.9.8a1
Christof
cthedot at gmail.com
Sun Dec 12 19:48:20 CET 2010
what is it
----------
A Python package to parse and build CSS Cascading Style Sheets.
(Not a renderer though!)
about this release
------------------
0.9.8a1 is an early alpha release. Please note the *major* changes in
the css value API.
main changes
------------
+ **API CHANGE (major)**
replace CSSValue with PropertyValue, Value and other classes.
NEW CLASSES:
:class:`cssutils.css.PropertyValue`
replaces CSSValue and CSSValueList
- is iterable (iterates over all single Value objects which
in soruce CSS might be separated by "," "/" or " "
- a comma separated list of IDENT values is no longer
handled as a single String (e.g. ``Arial, sans-serif``)
:class:`cssutils.css.Value`
replaces CSSPrimitiveValue with separate ``value`` and
``type`` info (value is typed, so e.g. string for e.g. STRING, IDENT or
URI values, int or float) and is base class for more specific values like:
:class:`cssutils.css.URIValue`
replaces CSSPrimitiveValue, additional attribute ``uri``
:class:`cssutils.css.DimensionValue`
replaces CSSPrimitiveValue, additional attribute ``dimension``
:class:`cssutils.css.ColorValue`
replaces CSSPrimitiveValue, additional attribute ``red``,
``green``, ``blue`` and ``alpha``
**TODO: Not yet complete, only rgb, rgba, hsl, hsla and has
values use this object and color and alpha information no done yet!**
:class:`cssutils.css.CSSFunction`
replaces CSSPrimitiveValue function, not complete yet
also renamed ``ExpressionValue`` to
:class:`cssutils.css.MSValue` with new API
- IMPROVEMENT/CHANGE: Validation of color values is tighter now. Values
like ``hsl(1, 2, 3)`` do not validate as it must be ``hsl(1, 2%, 3%)``.
This mostly effects HSL/A and RGB/A notation.
- **IMPROVEMENT**: New Value parsing and API accelerate parsing of style
declarations which take about 20-30% less time now. Of course this
depends on the complexity of your styles.
+ BUGFIX: fixes issue #41, #42, #45, #46
PropertyValue.value returns value without any comments now, else
use PropertyValue.cssText
- FEATURE: ``cssutils.replaceUrls()`` accepts as first argument a
`cssutils.css.CSSStyleSheet` but now also a
:class:`cssutils.css.CSSStyle
license
-------
cssutils is published under the LGPL version 3 or later, see
http://cthedot.de/cssutils/
If you have other licensing needs please let me know.
download
--------
For download options see http://cthedot.de/cssutils/
cssutils needs Python 2.4 and higher or Jython 2.5 and higher (tested with
Python 2.7.1(x64), 2.6.5(x64), 2.5.4(x32), 2.4.4(x32) and Jython 2.5.1
on Win7x64
only)
Bug reports (via Google code), comments, etc are very much appreciated!
Thanks.
Christof
More information about the Python-announce-list
mailing list