Skip to content

Commit

Permalink
Global links underlined by default (#3166)
Browse files Browse the repository at this point in the history
* a links underline, a.quite added

* added styles to omit header/footer

* added default link styles for headlines and lockup area

* minor :hover style alignment on cards-horiz, marquee-anchors, brick

* removed dubs underline on links

* removed styles overrides to support double in horiz-card, marquee-anch, brick

* [MWPW-145672] Remove Gnav global link styles

* [MWPW-161624] Link farm double underline on focus

* Ensure sub text in anchors is underlined correctly

* Ensure sub text in anchors is underlined correctly

---------

Co-authored-by: thi64146 <thi64146@adobe.com>
  • Loading branch information
overmyheadandbody and ryanmparrish authored Nov 12, 2024
1 parent 45f953f commit 5d2107e
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 9 deletions.
1 change: 1 addition & 0 deletions libs/blocks/card-horizontal/card-horizontal.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

.card-horizontal a {
color: var(--text-color);
text-decoration: none;
}

.card-horizontal a:focus {
Expand Down
4 changes: 4 additions & 0 deletions libs/blocks/global-footer/global-footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
list-style-type: none;
}

.global-footer a {
text-decoration: unset;
}

.global-footer a:hover {
text-decoration: none;
}
Expand Down
1 change: 1 addition & 0 deletions libs/blocks/marquee-anchors/marquee-anchors.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ html {
cursor: pointer;
position: relative;
color: var(--text-color);
text-decoration: none;
}

.marquee-anchors .links .anchor-link .heading-xs {
Expand Down
3 changes: 2 additions & 1 deletion libs/blocks/text/link-farms.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
text-decoration: underline;
}

.link-farm.text-block a:hover {
.link-farm.text-block a:is(:hover, :focus) {
text-decoration-style: double;
outline-offset: 3px;
}


Expand Down
6 changes: 6 additions & 0 deletions libs/styles/iconography.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ dealing w/ groups of media and associated text

.lockup-area > * { line-height: 0; }

.lockup-area a { text-decoration: none; }

.lockup-area a:hover,
.lockup-area a:focus,
.lockup-area a:active { text-decoration: underline; }

.center .lockup-area { justify-content: center; }
.right .lockup-area { justify-content: flex-end; }

Expand Down
40 changes: 32 additions & 8 deletions libs/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,10 @@ header.global-navigation.has-promo {
min-height: calc(var(--global-height-nav) + var(--global-height-navPromo));
}

header.global-navigation a {
text-decoration: unset;
}

@media (min-width: 900px) {
header.global-navigation.has-breadcrumbs {
padding-bottom: var(--global-height-breadcrumbs);
Expand Down Expand Up @@ -805,25 +809,46 @@ a.fragment {

a {
color: var(--link-color);
text-decoration: none;
text-decoration: underline;
}

a:hover {
text-decoration: underline;
a:hover,
a:focus,
a:active {
color: var(--link-hover-color);
}

a:has(> sub:only-child) { text-decoration: unset; }
a > sub:only-child { text-decoration: underline; }

/* Links Quiet */
a.quiet,
a.quiet:hover,
a.quiet:focus,
a.quiet:active {
text-decoration: none;
}

/* Links Static */
a.static,
a.static:hover {
a.static:hover,
a.static:focus,
a.static:active {
color: var(--text-color);
text-decoration: underline;
}

.dark a.static,
.dark a.static:hover {
.dark a.static:hover,
.dark a.static:focus,
.dark a.static:active {
color: var(--color-white);
text-decoration: underline;
}

:is(h1, h2, h3, h4, h5, h6) a,
:is(h1, h2, h3, h4, h5, h6) a:hover,
:is(h1, h2, h3, h4, h5, h6) a:focus,
:is(h1, h2, h3, h4, h5, h6) a:active {
color: currentColor;
}

/* Buttons */
Expand All @@ -833,7 +858,6 @@ a.static:hover {

.static-links a:not([class*="button"]) {
color: inherit;
text-decoration: underline;
}

.copy-link {
Expand Down

0 comments on commit 5d2107e

Please sign in to comment.