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

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.

Cheers,
Axel


-------------
"Florian Rivoal"  schrieb im Newsbeitrag 
news:F116A9B0-68F7-4149-8E87-69ABB836CB33@rivoal.net...


> 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