W3C home > Mailing lists > Public > www-style@w3.org > December 2014

Re: [css3-ui] outline property doesn't define which box to use

From: Axel Dahmen <brille1@hotmail.com>
Date: Mon, 8 Dec 2014 13:18:03 +0100
To: www-style@w3.org
Message-ID: <m644tu$hol$1@ger.gmane.org>
Thank you, Florian.

When I read further on the document I noticed the paragraph, too, but it was 
too late to revoke my question/suggestion.

Perhaps a short reference link to the corresponding sentence in 
"outline-offset", inserted at the "outline-color" property, would clarify 
the situation for other readers.


"Florian Rivoal"  schrieb im Newsbeitrag 

> On 04 Dec 2014, at 01:51, Axel Dahmen <brille1@hotmail.com> wrote:
> In the definition of the outline property it reads: "The outline created 
> with the outline properties is drawn 'over' a box".
> Which box does it refer to? Padding? Border? Content?

Any and all of them.

Section 6.5 (http://dev.w3.org/csswg/css-ui/#outline-offset) tells you that 
"By default, the outline is drawn starting just outside the border edge", 
making the outline be drawn "over" the margin box (if it is wide enough) or 
over surrounding elements. But using the outline-offset property, you can 
grow or shrink it, which may put it just about anywhere.

The sentence you quote is not so much about positioning the outline in terms 
of x and y. Instead, the intent is to say that the line, being over the 
content, is not part of it, and does not take any space that would influence 
the layout of other things.

The definition of outline in general, and of "over" in particular is quite 
vague, and leaves quite a bit of flexibility to browsers. In particular, a 
later sentence says "This specification does not define how multiple 
overlapping outlines are drawn, or how outlines are drawn for boxes that are 
partially obscured behind other elements."

This may eventually be clarified to bring greater interoperability, but this 
hasn't happened so far.

- Florian 
Received on Monday, 8 December 2014 12:18:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:49 UTC