From 63fd5123dd1f5fd939c6739ed052b6a4cf5e4ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 2 Feb 2021 22:32:14 +0000 Subject: [PATCH] Bug 1690225 - Unify focus-visible rules in ua.css. r=edgar We had different rules with the same declarations for all namespaces, so simplify that setup by having a single rule. Remove redundant *|* from selectors while at it (there's no default namespace in ua.css, so there's no need to do that). Depends on D103752 Differential Revision: https://phabricator.services.mozilla.com/D103753 --- layout/mathml/mathml.css | 7 +------ layout/style/res/html.css | 6 ------ layout/style/res/ua.css | 12 +++++------- layout/svg/svg.css | 5 ----- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/layout/mathml/mathml.css b/layout/mathml/mathml.css index 7bebcefd132d..dcf15dc1d0c1 100644 --- a/layout/mathml/mathml.css +++ b/layout/mathml/mathml.css @@ -56,17 +56,12 @@ ms[rquote]:after { } /**************************************************************************/ -/* Links and focusable elements */ +/* Links */ /**************************************************************************/ :any-link { text-decoration: none !important; } -:focus-visible { - /* Don't specify the outline-color, we should always use initial value. */ - outline: 1px dotted; -} - /**************************************************************************/ /* attributes common to all tags */ /**************************************************************************/ diff --git a/layout/style/res/html.css b/layout/style/res/html.css index 55b2d7287f64..7ae64ff36c51 100644 --- a/layout/style/res/html.css +++ b/layout/style/res/html.css @@ -701,12 +701,6 @@ canvas { user-select: none; } -/* focusable content: anything w/ tabindex >=0 is focusable */ -:focus-visible { - /* Don't specify the outline-color, we should always use initial value. */ - outline: 1px dotted; -} - iframe:focus-visible, body:focus-visible, html:focus-visible { diff --git a/layout/style/res/ua.css b/layout/style/res/ua.css index c147a9491146..128d99738ccb 100644 --- a/layout/style/res/ua.css +++ b/layout/style/res/ua.css @@ -134,7 +134,7 @@ } /* https://drafts.csswg.org/css-lists-3/#ua-stylesheet */ -*|*::marker { +::marker { text-align: end; text-transform: none; unicode-bidi: isolate; @@ -146,21 +146,19 @@ * the same changes to svg.css. */ -/* Links */ +/* Links and focusable content */ -*|*:any-link { +:any-link { cursor: pointer; } -*|*:any-link:focus-visible { +:focus-visible { /* Don't specify the outline-color, we should always use initial value. */ - /* TODO(emilio): I think this is redundant, html.css does the same for all - * :focus-visible elements. */ outline: 1px dotted; } /* Inert subtrees */ -*|*:-moz-inert { +:-moz-inert { -moz-inert: inert; } diff --git a/layout/svg/svg.css b/layout/svg/svg.css index 3901ac2e69aa..af3a55343b1a 100644 --- a/layout/svg/svg.css +++ b/layout/svg/svg.css @@ -97,11 +97,6 @@ foreignObject { opacity: inherit; } -:focus-visible { - /* Don't specify the outline-color, we should always use initial value. */ - outline: 1px dotted; -} - /* Make SVG shapes unselectable to avoid triggering AccessibleCaret on tap. will be supported in bug 1238882. */ circle, ellipse, line, mesh, path, polygon, polyline, rect {