W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: 'all' and the system focus outline

From: Doug Schepers <schepers@w3.org>
Date: Mon, 16 Mar 2015 21:41:44 -0400
Message-ID: <55078658.9060504@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>, Alice Boxhall <aboxhall@google.com>
Hey, Tab–

This may be a stupid idea, but could we distinguish the 'outline' 
property from the outline highlight?

In the same way that 'outline' has different characteristics than 
'border', there could be a 'highlight' or 'focus-ring' property that is 
different than 'outline' in that it's only for the focus outline.

This 'highlight' property would not be changed by the 'all' property, 
and 'outline' could be set and reset for all other purposes. This would 
also seem to address exposing some of the 'magic' of CSS–platform behavior.

Regards–
–Doug

On 3/16/15 7:18 PM, Tab Atkins Jr. wrote:
> The 'all' property, when you "all: initial" or "all: unset", also
> resets the 'outline' property.  This is troublesome, because, for a11y
> reasons, you don't want to kill the outline of an element by accident.
> You can restore it manually, but that's not something that most people
> will do, because it's not obvious that you have to do it.
>
> This is likely not *directly* overriding the outline styles, as
> they're on button:focus or whatever. But if your selector has at least
> one element and one class worth of specificity, it'll win in the
> cascade even when the element is focused.
>
> I don't know how to fix this. :/  We probably dont' want to exclude
> 'outline' from being reset by 'all'; unlike 'direction' and
> 'unicode-bidi', it's a valid property, and wanting to reset it when
> you're using it for something *other than* focus outlines is valid.
>
> ~TJ
>
Received on Tuesday, 17 March 2015 01:41:48 UTC

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