W3C home > Mailing lists > Public > public-html-comments@w3.org > November 2011

Re: Image width specification in html5

From: Jukka K. Korpela <jukka.k.korpela@kolumbus.fi>
Date: Mon, 21 Nov 2011 11:56:46 +0200
Message-ID: <4ECA205E.3010606@kolumbus.fi>
To: public-html-comments@w3.org
2011-11-21 11:34, Simon Pieters wrote:

> On Mon, 21 Nov 2011 09:47:52 +0100, Jukka K. Korpela
> <jukka.k.korpela@kolumbus.fi> wrote:
>> Or am I missing something?
> http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#dimRendering

This is rather confusing, but I'll try to understand what it says there.
It seems to say that for <img ... width="25%"> (though this is 
disallowed in HTML5), the width attribute value "maps to" the "dimension 
property" width, and this in turn is defined to mean that the value is 
parsed by a routine that accepts the percent sign. Then the browser "is 
expected to" use the parsed value 25% "for a presentational hint" for 
the property.

This sounds like a complicated way of saying a simple thing, but I 
suppose there are reasons to say things that way. But then comes the 
concept of "presentational hint":

"Some rules are intended for the author-level zero-specificity 
presentational hints part of the CSS cascade; these are explicitly 
called out as presentational hints."

I had to read this a few times to get a grasp of it.

The definition of "presentational hint" is somewhat implicit but seems 
to refer to "Precedence of non-CSS presentational hints" in the CSS 2.1 
spec at http://www.w3.org/TR/CSS2/cascade.html#preshint

It might be useful to formulate the rules more explicitly, saying, for 
example, that width and height attributes are mapped to presentational 
hints in the sense defined in CSS 2.1 if the value matches certain rules 
(and presumably ignored otherwise). But this might not be the intent, as 
in the current wording, there's the "is expected to" formulation, which 
is not at all the same as "is required to" or "shall".

Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 21 November 2011 09:57:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:28 UTC