Tab Atkins wrote:
> > http://dev.w3.org/csswg/css-fonts/#om-fontfeaturevalues
> >
> > # interface CSSFontFeatureValuesRule : CSSRule {
> > # readonly attribute DOMString familyList;
> > # readonly attribute DOMString valueText;
> > # };
> > #
> > # familyList of type DOMString, readonly
> > # The list of one or more font families for which a
> > # given set of feature values is defined.
> >
> > Probably should say, "serialized as for 'font-family' [link to property]"
> > so we're clear on how exactly it serializes.
> >
> > # valueText of type DOMString, readonly
> > # Serialized set of feature values.
> >
> > I'd have expected something more like the interface
> > in CSS Animations for keyframe rules:
> > http://www.w3.org/TR/css3-animations/#CSSKeyframesRule-interface
>
> You don't want to copy Animations - it's a legacy mistake. You want
> to just extend CSSGroupingRule, defined in Conditional, like:
>
> interface CSSFontFeatureValuesRule : CSSGroupingRule {
> readonly attribute DOMString familyList;
> }
>
> Done!
This requires that the individual value definition blocks be a
subclass of CSSRule. So then you need to define what it contains. And
you really start to bend the notion of what an @-rule is, the value
definition blocks look like @-rules but basically aren't other than
from a syntax viewpoint. What does it mean if *other* CSSGroupingRule
structs contain one of these CSSRule's?!?
I think the hacky use of CSSStyleDelcaration in the original
definition of CSSFontFaceRule in CSS2 [1] should be a cautionary tale,
it's a bad idea to smush together objects simply because they have a
few fields or methods that overlap.
I think it would be simpler to leave this as an empty class for now,
remove the 'familyList' and 'valueText' fields at this level. We can
worry about what may or may not be useful once it's used more widely.
Regards,
John Daggett
[1] http://dev.w3.org/csswg/cssom/#the-cssfontfacerule-interface