Fixes styles of Minerva tabs in visited/active states

Follow up to Iefa1fee9c6ac0326bc43844205dd3f5dc53fc903

Bug: T367892
Change-Id: I832e5a0b8d1febf38d574098e110bac901528b6e
This commit is contained in:
Jon Robson 2024-09-18 12:52:23 -07:00 committed by Jdlrobson
parent e23c1ae9b6
commit 5900ab2c28
3 changed files with 26 additions and 12 deletions

View file

@ -17,7 +17,7 @@
<ul{{#id}} id="{{.}}"{{/id}} class="minerva__tab-container">
{{#items}}
<li class="minerva__tab {{class}}">
<a href="{{href}}" rel="{{rel}}" data-event-name="tabs.{{context}}">{{text}}</a>
<a class="minerva__tab-text" href="{{href}}" rel="{{rel}}" data-event-name="tabs.{{context}}">{{text}}</a>
</li>
{{/items}}
</ul>

View file

@ -3,23 +3,37 @@
overflow-x: auto;
.minerva__tab {
font-size: @font-size-tag-line;
margin: 0 10px 0 0;
font-weight: bold;
padding-bottom: 6px;
display: inline-block;
a {
// TODO: 'a' selector after caching
a,
.minerva__tab-text {
font-size: @font-size-tag-line;
font-weight: bold;
color: @color-subtle;
}
a:visited,
a:hover,
a:active {
text-decoration: none;
&.new {
color: @color-link-red;
}
}
&.new a {
// 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();
}

View file

@ -19,11 +19,11 @@ a:not( [ href ] ) {
}
/* This not does apply to links with role button per discussion on T373989 */
a:not( [ role='button' ] ) {
a:not( [ role='button' ] ):not( .minerva__tab-text ) {
.cdx-mixin-link-base();
}
a.new {
a:not( [ role='button' ] ):not( .minerva__tab-text ).new {
.cdx-mixin-link-red();
}