dotless-vienna
未读,2010年12月20日 02:12:332010/12/20登录即可回复作者
登录即可转发
您无权在此群组中删除帖子
请登录以举报消息
要么此群组的电子邮件地址为匿名状态,要么您得查看成员电子邮件地址权限才能查看原始帖子
收件人 cssutils
Hi,
I'm using various third-party Javascript UI widgets in my web
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
widgets:
- 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
namespace
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?
Franz