0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge pull request #30389 from twbs/underline-links

v5: Underline links
This commit is contained in:
Mark Otto 2020-03-20 08:58:54 -07:00 committed by GitHub
commit 0388ee03d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 9 deletions

View File

@ -21,7 +21,7 @@
&:hover { &:hover {
color: $body-color; color: $body-color;
text-decoration: none; text-decoration: if($link-hover-decoration == underline, none, null);
} }
&:focus, &:focus,

View File

@ -150,7 +150,7 @@
&:hover, &:hover,
&:focus { &:focus {
color: $dropdown-link-hover-color; color: $dropdown-link-hover-color;
text-decoration: none; text-decoration: if($link-hover-decoration == underline, none, null);
@include gradient-bg($dropdown-link-hover-bg); @include gradient-bg($dropdown-link-hover-bg);
} }

View File

@ -18,7 +18,7 @@
&:hover, &:hover,
&:focus { &:focus {
text-decoration: none; text-decoration: if($link-hover-decoration == underline, none, null);
} }
// Disabled state lightens text // Disabled state lightens text

View File

@ -14,7 +14,7 @@
&:hover { &:hover {
z-index: 2; z-index: 2;
color: $pagination-hover-color; color: $pagination-hover-color;
text-decoration: none; text-decoration: if($link-hover-decoration == underline, none, null);
background-color: $pagination-hover-bg; background-color: $pagination-hover-bg;
border-color: $pagination-hover-border-color; border-color: $pagination-hover-border-color;
} }

View File

@ -249,9 +249,9 @@ $body-text-align: null !default;
// Style anchor elements. // Style anchor elements.
$link-color: $primary !default; $link-color: $primary !default;
$link-decoration: none !default; $link-decoration: underline !default;
$link-hover-color: darken($link-color, 15%) !default; $link-hover-color: darken($link-color, 15%) !default;
$link-hover-decoration: underline !default; $link-hover-decoration: null !default;
// Darken percentage for links with `.text-*` class (e.g. `.text-success`) // Darken percentage for links with `.text-*` class (e.g. `.text-success`)
$emphasized-link-hover-darken-percentage: 15% !default; $emphasized-link-hover-darken-percentage: 15% !default;

View File

@ -24,6 +24,7 @@
padding: .25rem .625rem .25rem .5rem; padding: .25rem .625rem .25rem .5rem;
font-weight: 600; font-weight: 600;
color: rgba($black, .65); color: rgba($black, .65);
text-decoration: none;
@include border-radius(.25rem); @include border-radius(.25rem);
> * { pointer-events: none; } > * { pointer-events: none; }
@ -31,7 +32,6 @@
&:hover, &:hover,
&:focus { &:focus {
color: rgba($black, .85); color: rgba($black, .85);
text-decoration: none;
background-color: rgba($bd-purple-bright, .1); background-color: rgba($bd-purple-bright, .1);
} }
} }
@ -64,12 +64,12 @@
padding: .25rem .5rem; padding: .25rem .5rem;
@include font-size(.875rem); @include font-size(.875rem);
color: rgba($black, .65); color: rgba($black, .65);
text-decoration: none;
@include border-radius(.25rem); @include border-radius(.25rem);
&:hover, &:hover,
&:focus { &:focus {
color: rgba($black, .85); color: rgba($black, .85);
text-decoration: none;
background-color: rgba($bd-purple-bright, .1); background-color: rgba($bd-purple-bright, .1);
} }
} }

View File

@ -1,4 +1,4 @@
// stylelint-disable selector-max-type, selector-max-combinators, selector-max-compound-selectors // stylelint-disable selector-max-type, selector-max-compound-selectors
.bd-toc nav { .bd-toc nav {
padding-top: .125em; padding-top: .125em;
@ -14,6 +14,10 @@
list-style-type: disc; list-style-type: disc;
} }
a:not(:hover) {
text-decoration: none;
}
a code { a code {
font: inherit; font: inherit;
} }