W3C home > Mailing lists > Public > www-style@w3.org > June 2012

[cssom] .style on CSSFontFaceRule and CSSPageRule should probably not be CSSStyleDeclarations as that interface is currently defined

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 27 Jun 2012 17:10:20 -0400
Message-ID: <4FEB76BC.80102@mit.edu>
To: www-style list <www-style@w3.org>
Right now CSSStyleDeclaration seems to be a merge of the old 
CSS2Properties interface and the old CSSStyleDeclaration interface.

That causes problems for the .style of CSSFontFaceRule and CSSPageRule, 
because most of those property names don't actually apply to those 
(which means it's not clear what the behavior should be on setting), 
whereas at least CSSFontFaceRule has descriptor names (e.g. "src") that 
are not reflected in the list at all.

I haven't looked at @page in detail yet, but it's not at all clear to me 
that the set of font descriptors is well represented by even the old 
CSSStyleDeclaration interface (e.g. the whole priority thing makes no 
sense for it).  But if we posit that it is, I believe it would make more 
sense to go to a setup where the CSSStyleDeclaration interface only has 
properties, and maybe getPropertyPriority.  We should move the rest of 
the per-property getters/setters to a separate interface that inherits 
from CSSStyleDeclaration (CSS2Properties might in fact be an OK name for 
it, but I don't care that much about the name) and come up with a 
different interface (CSSFontFaceDesciptors?) that also inherits from 
CSSStyleDeclaration and is implemented by the .style of a CSSFontFaceRule.

And as long as we're here, should CSSFontFaceRule really have a .style, 
or should it have a .descriptors?

Received on Wednesday, 27 June 2012 21:10:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:50:23 UTC