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

Re: [css3-ui] what to do if outline-offset is sufficiently negative (issue 38)

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 24 Nov 2014 09:42:49 -0800
Message-Id: <478A37DC-801B-4CDF-8B30-9C933EBFBB02@gmail.com>
Cc: (wrong string) Çelik <tantek@cs.stanford.edu>, "kennyluck@csail.mit.edu" <kennyluck@csail.mit.edu>
To: Florian Rivoal <florian@rivoal.net>
On Nov 24, 2014, at 8:53 AM, Florian Rivoal <florian@rivoal.net> wrote:
> The spec does not forbid negative values for outline-offset. In general this is fine, but if the negative value is large enough (in absolute value), the sides of the outline will meet in the middle of the box and pass each other, giving confusing and uninteroperable results.
> Forbidding negative values entirely is probably not what we want, as small negative values are not problematic.
> The most reasonable possibility suggested last time this was discussed would be for UAs to floor the at the largest (in absolute terms) value that doesn¡¯t cause issues. Remains to define exactly where that is.
> Possibilities:
> a - at least 1px of the outline is still visible
> b - the entire outline¡¯s thickness is still visible
> c - something else

Or just let the outline disappear once the offsets would overlap each other in either dimension. Just as if you had something like 'box-shadow: 0 0 0 20px white inset, 0 0 0 21px black inset', the visible part of the black shadow disappears at smaller box sizes.

PS. I've used box-shadow before as a substitute for outline, with white to look like the page background, or some other color to look like the element background when needing negative offsets, when I've been frustrated by the annoying inability of 'outline' to follow the contours of border-radius. 
Received on Monday, 24 November 2014 17:43:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC