Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scss/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Boosted mod
a {
color: inherit;
text-decoration: underline; // Boosted mod: links are perceivable globally
text-decoration: if($link-decoration == underline, null, underline); // Boosted mod: links are perceivable globally

&:hover {
color: theme-color("primary");
Expand Down
2 changes: 2 additions & 0 deletions scss/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
@include transition($badge-transition);

@at-root a#{&} {
text-decoration: if($link-decoration == none, null, none); // Boosted mod: links are perceivable globally

@include hover-focus() {
text-decoration: none;
}
Expand Down
2 changes: 1 addition & 1 deletion scss/_breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
display: flex;

a {
text-decoration: underline;
text-decoration: if($link-decoration == underline, null, underline); // Boosted mod: links are perceivable globally
}

// The separator between breadcrumbs (by default, a forward-slash: "/")
Expand Down
6 changes: 0 additions & 6 deletions scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
// end mod
}

// Boosted mod remove underline for a.btn
a.btn {
text-decoration: none;
}
// End mod

// Future-proof disabling of clicks on `<a>` elements
a.btn.disabled,
fieldset:disabled a.btn {
Expand Down
3 changes: 2 additions & 1 deletion scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
@include font-size($navbar-brand-font-size);
font-weight: $font-weight-bold; // Boosted mod
line-height: .75; // Boosted mod
text-decoration: if($link-decoration == none, null, none);
letter-spacing: inherit; // Boosted mod
white-space: nowrap;
outline-offset: $spacer; // Boosted mod
Expand All @@ -97,7 +98,7 @@
// end mod

@include hover-focus() {
text-decoration: none;
text-decoration: if($link-hover-decoration == none, null, none); // Boosted mod
}

// Boosted mod
Expand Down
5 changes: 5 additions & 0 deletions scss/_o-scroll-up.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
align-items: center;
padding-left: map-get($spacers, 2);
font-weight: $font-weight-bold;
text-decoration: if($link-decoration == none, null, none);
background-color: rgba($white, .8);

&:hover {
text-decoration: if($link-hover-decoration == none, null, none);
}

@each $breakpoint, $container-margin in $container-fluid-margin-widths {
@include media-breakpoint-up($breakpoint) {
right: $container-margin;
Expand Down
3 changes: 2 additions & 1 deletion scss/_o-step-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
margin: auto;
overflow: hidden;
color: $white;
text-decoration: if($link-decoration == none, null, none);
white-space: nowrap;
outline-offset: map-get($spacers, 3);

Expand All @@ -60,7 +61,7 @@
}

&:hover {
text-decoration: underline;
text-decoration: if($link-hover-decoration == underline, null, underline);
}

&:focus {
Expand Down
2 changes: 1 addition & 1 deletion scss/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
&:focus {
z-index: 2;
color: $pagination-hover-color;
text-decoration: $link-hover-decoration; // Boosted mod
text-decoration: if($link-hover-decoration == none, null, none); // Boosted mod
background-color: $pagination-hover-bg;
border-color: $pagination-hover-border; // Boosted mod
}
Expand Down
17 changes: 0 additions & 17 deletions scss/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -260,28 +260,11 @@ a {
}
}

// Boosted mod
// stylelint-disable selector-max-type
main a:not([class]) {
&,
&:hover {
text-decoration: underline;
}

&:focus {
text-decoration: underline;
outline-offset: $border-width;
}
}
// stylelint-enable selector-max-type
// end mod

// And undo these styles for placeholder links/named anchors (without href)
// which have not been made explicitly keyboard-focusable (without tabindex).
// It would be more straightforward to just use a[href] in previous block, but that
// causes specificity issues in many other styles that are too complex to fix.
// See https://github.com/twbs/bootstrap/issues/19402
// Boosted mod: adding tabindex, since dismissable popovers use <a tabindex> without href
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
Expand Down
4 changes: 2 additions & 2 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ $body-color: $black !default;
// Style anchor elements.

$link-color: theme-color("dark") !default;
$link-decoration: none !default;
$link-decoration: underline !default;
$link-hover-color: theme-color("primary") !default;
$link-hover-decoration: none !default;
$link-hover-decoration: underline !default;
// Darken percentage for links with `.text-*` class (e.g. `.text-success`)
$emphasized-link-hover-darken-percentage: 15% !default;

Expand Down
3 changes: 3 additions & 0 deletions site/docs/4.5/assets/scss/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
padding: .25rem 1.5rem;
@include font-size(90%);
color: $gray-700; // Boosted mod
text-decoration: if($link-decoration == none, null, none); // Boosted mod
}

.bd-sidebar .nav > li > a:hover {
Expand All @@ -165,6 +166,8 @@
// Boosted mod
.bd-links a,
.bd-toc a {
text-decoration: if($link-decoration == none, null, none); // Boosted mod

&:focus {
outline-offset: -1px;
}
Expand Down
10 changes: 1 addition & 9 deletions site/docs/4.5/content/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,20 +450,12 @@ You may add `o-square-list` class to the root element of a list (`<ul>`) to get

## Links

By default, links are black, and not underlined
By default, links are black and underlined.

{% capture example %}
<a href="#">This is a sample default link</a>
{% endcapture %} {% include example.html content=example %}

### Underlined

A link into a `p` tag become underlined, to be clearly identified.

{% capture example %}
<p>Some text in a paragraph, and so <a href="#">the link are underline</a></p>
{% endcapture %} {% include example.html content=example %}

### With arrow

Add the class `o-link-arrow` to a link, add an arrow after the text link.
Expand Down