Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35388

Re: Outline color invert

From James Kirk <noneya.invalid@gmail.com>
Newsgroups comp.lang.javascript, comp.infosystems.www.authoring.stylesheets
Subject Re: Outline color invert
Followup-To comp.infosystems.www.authoring.stylesheets
Date 2018-07-08 09:47 -0400
Organization Time Travel Tracing
Message-ID <20180708094726.00004d35@james.kirk.invalid> (permalink)
References <NK2dnc0iw8hmRtzGnZ2dnUU7-YXNnZ2d@westnet.com.au>

Cross-posted to 2 groups.

Followups directed to: comp.infosystems.www.authoring.stylesheets

Show all headers | View raw


In-Reply-To: <NK2dnc0iw8hmRtzGnZ2dnUU7-YXNnZ2d@westnet.com.au>
Andrew Poulos <ap_prog@hotmail.com> wrote:

Followup-To: comp.infosystems.www.authoring.stylesheets

> I'm working on a site that requires keyboard navigation. This is
> easy enough to do using tabindex and role but the color of the
> outline on the focussed interactive element is (by default) blue.

Depends on the UA and or user modifications.

[snip]

> How can I change the color of the outline to something
> appropriate without knowing beforehand what the color of the
> background might be currently?

Consider alternatives to modifying the outline. Perhaps: box-shadow.
<https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow>

:focus {
	box-shadow: 0 0 1px 3px white;
}

Consider choosing a selector that would be more specific then :focus.

-- 
James Kirk

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Outline color invert Andrew Poulos <ap_prog@hotmail.com> - 2018-07-08 19:40 +1000
  Re: Outline color invert "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-07-08 12:36 +0200
    Re: Outline color invert Andrew Poulos <ap_prog@hotmail.com> - 2018-07-08 21:15 +1000
  Re: Outline color invert Julio Di Egidio <julio@diegidio.name> - 2018-07-08 05:09 -0700
  Re: Outline color invert James Kirk <noneya.invalid@gmail.com> - 2018-07-08 09:47 -0400
  Re: Outline color invert Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-07-08 21:17 +0200
    Re: Outline color invert Andrew Poulos <ap_prog@hotmail.com> - 2018-07-09 13:31 +1000
      Re: Outline color invert Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-07-09 21:28 +0200

csiph-web