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

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