From da1312443ee61f9c6de4eb8ea200c94145345bbe Mon Sep 17 00:00:00 2001 From: Tim Giles Date: Thu, 23 Mar 2023 14:07:42 +0000 Subject: [PATCH] Bug 1813077 - Style anchor elements in the chrome like XUL text links. r=dao Differential Revision: https://phabricator.services.mozilla.com/D171143 --- browser/themes/shared/browser-shared.css | 11 +++++------ toolkit/themes/shared/global-shared.css | 9 +++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css index 3e6a2f9698ba..95240d983380 100644 --- a/browser/themes/shared/browser-shared.css +++ b/browser/themes/shared/browser-shared.css @@ -156,21 +156,20 @@ /* Set link color with proper contrast for WebExt themes */ -toolbar .text-link:-moz-lwtheme, -panel .text-link:-moz-lwtheme { +:is(toolbar, panel) :is(a, .text-link):-moz-lwtheme { color: #0060df; } -toolbar[brighttext] .text-link:-moz-lwtheme, -:root[lwt-popup-brighttext] panel .text-link { +toolbar[brighttext] :is(a, .text-link):-moz-lwtheme, +:root[lwt-popup-brighttext] panel :is(a, .text-link) { color: var(--lwt-brighttext-url-color); } -toolbar .text-link:-moz-lwtheme:not(:hover), -panel .text-link:-moz-lwtheme:not(:hover) { +:is(toolbar, panel) :is(a, .text-link):-moz-lwtheme:not(:hover) { text-decoration: none; } + /* Toolbar / content area border */ #navigator-toolbox { diff --git a/toolkit/themes/shared/global-shared.css b/toolkit/themes/shared/global-shared.css index 432e736831b1..8950bdf9593c 100644 --- a/toolkit/themes/shared/global-shared.css +++ b/toolkit/themes/shared/global-shared.css @@ -147,21 +147,22 @@ xul|label[disabled="true"] { /* Links */ -.text-link { +.text-link, +a { color: -moz-nativehyperlinktext; cursor: pointer; } -.text-link:hover { +:is(a, .text-link):hover { text-decoration: underline; } -.text-link:-moz-lwtheme { +:is(a, .text-link):-moz-lwtheme { color: inherit; text-decoration: underline; } -.text-link:focus-visible { +:is(a, .text-link):focus-visible { outline: var(--focus-outline); /* Not using --focus-outline-offset here because that's intended for elements with a background, and we only want a slight offset here while not