[whatwg] Outline style to use for drawSystemFocusRing

Ian Hickson ian at hixie.ch
Tue Jul 30 08:45:25 PDT 2013


On Mon, 29 Jul 2013, Rik Cabanier wrote:
> On Mon, Jul 29, 2013 at 5:26 PM, Ian Hickson <ian at hixie.ch> wrote:
> > On Mon, 29 Jul 2013, Rik Cabanier wrote:
> > >
> > > Does that mean it should be stroked along the path?
> >
> > That depends on the platform. Some platforms render the focus as a 
> > highlight, some as a dotted line around the exact path of the control, 
> > some as a box around the bounding box of the focused control, etc.
> >
> > The idea of this API is to let the user agent render the focus ring 
> > however it is appropriate for the platform.
> 
> I see. So the user agent can decided if it closes the path, use end 
> caps, round joins, etc. Maybe the spec should be more specific and say 
> that nothing in the graphics state (except clipping) should affect the 
> focus ring.

Ok, done.


> > > As for the color of the focus ring, shouldn't it come from the 
> > > ':focus' style of the element that is passed in?
> >
> > It should come from the platform.
> 
> Why not the style of the element? If the child element has a class of 
> 'button' and the CSS has
> 
> button:focus {
>   color:red;
> }
> 
> Shouldn't the focus be in red?

The button is likely to be invisible, so it's likely to not have computed 
style, so I don't think this works.


On Mon, 29 Jul 2013, Dominic Mazzoni wrote:
> 
> While I also think there should probably be some way to override at 
> least the color of the focus ring in order to match the rest of the UI

Yeah, I think on the medium to long term we'll add something as suggested 
in this e-mail:

   http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jul/0345.html

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list