Dec 20, 2010, 2:12:33 AM12/20/10
application, all of them bring their own external stylesheets.
Unfortunately, some widgets have the annoying habbit to define some
styles with global selectors or use different JQuery UI CSS themes
that overwrite each other.
In my HTML, I already surrounded each widget with a "namespacing" div
(e.g. <div class="grid-widget"></div>). What I like to achieve with
cssutils is to establish this namespacing in the css files of the
- element selectors like table, iframe etc should be prefixed with
their widget namespace class (e.g. .grid-widget table)
- "top level" selectors such as body, * should be replaced with the
widget namespace class
- all jquery ui styles should also be restricted to the widget
Since I fetch new versions for my widgets, I'd like to automate these
css transformations with a python script. Is there any cssutils
example for this purpose?