From 3d74f38a51b1b4d397cacd8dda89eb63b91b2ef3 Mon Sep 17 00:00:00 2001 From: bwang Date: Fri, 27 Sep 2024 13:58:25 -0500 Subject: [PATCH] Scope codex link styles to footer and content body, remove cached CSS Depends-on: I22e9c0d67b69ed37310c47db55bedb67f51efc90 Bug: T375832 Change-Id: I6e9e29fd5b140ae8eb4e6b011d558ea778c92028 --- includes/Skins/ToggleList/ToggleList.less | 5 +--- resources/skins.minerva.amc.styles/tabs.less | 23 ++----------------- .../content/links.less | 15 +++++++----- .../MainMenuItem.less | 1 - .../NotificationsOverlay.less | 4 ++++ 5 files changed, 16 insertions(+), 32 deletions(-) diff --git a/includes/Skins/ToggleList/ToggleList.less b/includes/Skins/ToggleList/ToggleList.less index 9dbff9b97..ac8904ee2 100644 --- a/includes/Skins/ToggleList/ToggleList.less +++ b/includes/Skins/ToggleList/ToggleList.less @@ -10,10 +10,7 @@ display: flex; align-items: center; padding: 0.75em 0.875em; - - &:hover { - text-decoration: none; - } + text-decoration: none; } .toggle-list-item__label { diff --git a/resources/skins.minerva.amc.styles/tabs.less b/resources/skins.minerva.amc.styles/tabs.less index 22b988998..2ee6a54b2 100644 --- a/resources/skins.minerva.amc.styles/tabs.less +++ b/resources/skins.minerva.amc.styles/tabs.less @@ -7,34 +7,15 @@ padding-bottom: 6px; display: inline-block; - // TODO: 'a' selector after caching - a, .minerva__tab-text { font-size: @font-size-tag-line; font-weight: bold; color: @color-subtle; text-decoration: none; - - &.new { - color: @color-link-red; - } } - // TODO: Remove entire selector after caching - // Currently needed to override default link styles - a:not( [ role='button' ] ) { - &:link, - &:visited, - &:hover, - &:active { - color: @color-subtle; - text-decoration: none !important; - } - } - - // TODO: Remove entire selector after caching - &.new a:not( [ role='button' ] ) { - .cdx-mixin-link-red(); + &.new .minerva__tab-text { + color: @color-link-red; } &:last-child { diff --git a/resources/skins.minerva.base.styles/content/links.less b/resources/skins.minerva.base.styles/content/links.less index 5241eae83..f79d96252 100644 --- a/resources/skins.minerva.base.styles/content/links.less +++ b/resources/skins.minerva.base.styles/content/links.less @@ -18,13 +18,16 @@ a:not( [ href ] ) { cursor: pointer; } -/* This not does apply to links with role button per discussion on T373989 */ -a:not( [ role='button' ] ):not( .minerva__tab-text ) { - .cdx-mixin-link-base(); -} +footer, +.mw-body-content { + /* This not does apply to links with role button per discussion on T373989 */ + a:not( [ role='button' ] ):not( .mw-selflink ):not( .cdx-card ) { + .cdx-mixin-link-base(); -a:not( [ role='button' ] ):not( .minerva__tab-text ).new { - .cdx-mixin-link-red(); + &.new { + .cdx-mixin-link-red(); + } + } } // External links diff --git a/resources/skins.minerva.mainMenu.styles/MainMenuItem.less b/resources/skins.minerva.mainMenu.styles/MainMenuItem.less index c7246e68b..5f3b30816 100644 --- a/resources/skins.minerva.mainMenu.styles/MainMenuItem.less +++ b/resources/skins.minerva.mainMenu.styles/MainMenuItem.less @@ -19,7 +19,6 @@ .toggle-list-item__anchor:hover { box-shadow: inset 4px 0 0 0 @box-shadow-color-progressive--focus; - text-decoration: none; } .client-nojs & .skin-minerva-list-item-jsonly { diff --git a/resources/skins.minerva.mainMenu.styles/NotificationsOverlay.less b/resources/skins.minerva.mainMenu.styles/NotificationsOverlay.less index e636a8287..eff3f5920 100644 --- a/resources/skins.minerva.mainMenu.styles/NotificationsOverlay.less +++ b/resources/skins.minerva.mainMenu.styles/NotificationsOverlay.less @@ -2,6 +2,10 @@ .notifications-overlay { visibility: visible; + + a { + text-decoration: none; + } } // needs to be more specific than .overlay rules