Re: [CSS21] Question on "Applies to:" information

On Tuesday 2011-11-08 15:08 -0800, "Gérard Talbot" wrote:
> 
> Le Mar 8 novembre 2011 14:11, L. David Baron a écrit :
> > I think we should remove the "Applies To:" lines from our specs.  I
> > think any benefit gained from them is lost by their inaccuracy
> > (since, given their length, they are often approximations).  They've
> > led to substantial confusion when they've been incorrect (e.g., when
> > early drafts of transitions said that the properties apply only to
> > inlines and blocks).
> >
> > In the case where they are intended to add restrictions on how the
> > property works that are not already expressed in the prose, we
> > should add those restrictions to the prose.
> 
> In the case of font-weight supposedly applying to all elements, this has
> been stated as such since the initial CSS2 version of 1998.
> 
> The thing that would have been useful, helpful and meaningful wrt
> font-weight property was to simply state that font-weight applies to all
> elements which can render text or render inline text content or whose
> content model can have text content.

That's actually not true.  Consider, for example:

img { font-weight: bold; width: 10ch; }

The img element can't render inline text content, but the 'ch' unit
is influenced by the weight of the font since it depends on the "0"
glyph [1], so font-weight does have an effect here.

-David

[1] http://dev.w3.org/csswg/css3-values/#ch-unit

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Tuesday, 8 November 2011 23:12:00 UTC