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

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

From: Florian Rivoal <florian@rivoal.net>
Date: Fri, 5 Dec 2014 11:46:40 +0100
Cc: www-style@w3.org
Message-Id: <F116A9B0-68F7-4149-8E87-69ABB836CB33@rivoal.net>
To: Axel Dahmen <brille1@hotmail.com>

> 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 Friday, 5 December 2014 10:47:06 UTC

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