Re: [css-device-adapt][cssom] Missing VIEWPORT_RULE definition

Sylvain Galineau wrote:

> I assume @viewport will introduce its own VIEWPORT_RULE type to the
> CSSRule interface [1].
> At what stage does that happen i.e. when does a new rule type get
> assigned in the CSSWG 0-1000 range?
> Given that css-device-adapt is a WD, I assume implementations would
> currently pick a value outside the range and expose a

I noticed this too while working on a new @-rule implementation.  I
think we need to come up with some general requirements for new
@-rules and come up with a central place to register the constants
that need to be defined for these.  We could rev the OM spec everytime
a new one is needed but that sounds impractical.

Defining new constants across specs that need to be consistent with
the ones defined in the OM spec  (e.g. the keyframe rule constants in
CSS3 Animations [1]) is a recipe for screwups.

Seems like it would be *much* nicer to have an CSSRule interface that
allowed the precise value to be queried rather than relying on a
brittle universal definition, especially taking into account prefixed
implementations of new @-rules.

Also, new @-rules need to have some form of DOM interface definition
and in general should probably follow the behavior of other OM API's.
For example, the cssText field of CSSRule raises a DOMException on a
syntax error but the wording in CSS3 Animations says nothing about
similar exception when setting fields of keyframe rules.  The @-rules
in GCPM lack any DOM intereface information.


John Daggett

[1] keyframe constants

Received on Wednesday, 12 October 2011 00:38:05 UTC