see whatever…

jump to menu

December 29, 2007

cssutils 0.9.4b1

Filed under: CSS,cssutils — see @ 7:19 pm

I’ve put probably (if no major problems occcur) the last but in any case the first beta release of cssutils online. Mainly a few improvements and bugfixes, a bit more docs and a thing here or there. The main feature may be a “combine” script which resolves @import rules in a sheet. Idea is to have a simple “proxy” CSS loaded from an HTML page which then loads all other needed CSS files (for e.g. layout, modules, colors or however you structure your CSS files). For production the “combine” script should be run which resolves the @imports in the proxy script (no nested imports yet!) and saves the resulting SINGLE CSS files optionally minified for deployment. The HTML does not have to be changed as the proxy ideally contains all needed CSS rules now. But for development a nice structure of CSS files may be used and kept…

Inspired by the Yahoo HTML performance guides (google for it, too lazy too look for the link now but I realize writing this comment almost takes longer ;) ) which propose to cut down on HTTP requests (very simplified summarized…). CSS certainly may quite easy be combined. Javascript is not as easy as it has no direct “include” facility, should be possible though.

Anyway, cssutils 0.9.5 will (probably) be adding better support for selectors, ideally it will be possible to query a cssutils stylesheet for styles for certain elements or documents. As this means building the complete first C of CSS (the Cascade) this will probably take a bit longer. But I guess it will make cssutils at least a bit more useful than just being a very big pretty printer…

BTW, I need to define which CSS hacks survive cssutils. I guess mostly hacks in the bounds of valid CSS will survive, currently the only non-valid hack “$propname” (used for IE) does survive. Anyway, something for next year ;)

3 Comments »

  1. I’m very happy to see that cssutils is under active development, and I’m looking forward to seeing what you come up with for selectors in 0.9.5, since I will probably end up using them in a project I’ve started recently.

    I’ve just finished a full DOM 2 HTML implementation and my next step is to add DOME StyleSheet and CSS support in. I’m glad that you’ve already written most of it because I don’t want to :)

    I don’t suppose you want to write a DOM Event module as well, do you?

    Anyway, I’m sure I’ll be harassing you more in the near future as I start to integrate cssutils into my project. Thanks for a great module!

    Comment by Paul Bonser — December 30, 2007 @ 8:06 am

  2. > I don’t suppose you want to write a DOM Event module as well, do you?

    to be honest – no ;)

    I guess I’ll be more than occupied with cssutils, but let me know how your project goes. Regarding selectors: If there is anything you like to have please email me. I start with something basic but any real use case brings new ideas what would be good to have in the API and as there is no official one yet…

    Comment by see — December 30, 2007 @ 11:03 am

  3. [...] cssutils, which is a mostly complete python DOM CSS implementation. The cssutils version 0.9.4b1 was just released with mention of some sort of selector support being added in version 0.9.5, which will hopefully [...]

    Pingback by PIBlog » Blog Archive » Python Web Browser on the way — December 30, 2007 @ 9:10 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress