Re: [css-d] CSS Javascript API

* Ian Hickson wrote:
>On Thu, 1 Jan 2004, Bjoern Hoehrmann wrote:
>> I need an interface (or interfaces) for tree-style access to cascading
>> style sheets to write general purpose CSS processing tools.
>Could you be more specific? DOM2 CSS does satisfy what you describe,

I gave some examples... Say I want to write a general purpose CSS pretty
printer based on DOM Level 2 CSS. I would need a DOM implementation. I
tried to write one and failed [1].

Even if it would be possible to implement the specification [2] suggests
that the implementation should not provide the UnknownRule interface. My
pretty printer would thus be limited to CSS Level 2.0 style sheets in
contrast to the intention of beeing a general purpose tool.

And, would you use a CSS pretty printer that drops all comments in your
style sheets? I would not.


>> A CSS DOM Use Cases and Requirements document would probably be helpful.
>Indeed, unfortunately I don't really know what the use cases and
>requirements _are_. That is what I am trying to find out. :-)


  CSS DOM Use Cases and Requirements
  W3C Working Draft ...
  Status of this Document
  Table of Contents
  1. Use Cases

    We have no idea, please send comments to

  A. References


However, to make a start, I need a Selector API that

  * is at least as sophisticated as [3]
  * is forward-compatible in a usable manner
  * includes support for CSS Level 3 Selectors
  * allows to query for the selectors specifity
  * provides access to comments as in e.g. a/**/b {...}
  * allows to query pseudo classes, attribute selectors, and
    pseudo elements for their associated element type selector


Received on Thursday, 1 January 2004 21:26:45 UTC