Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link decoration handling in Bootstrap SCSS files #39934

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
line-height: var(--#{$prefix}btn-line-height);
color: var(--#{$prefix}btn-color);
text-align: center;
text-decoration: if($link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, $link-decoration);
white-space: $btn-white-space;
vertical-align: middle;
cursor: if($enable-button-pointers, pointer, null);
Expand All @@ -42,7 +42,7 @@

&:hover {
color: var(--#{$prefix}btn-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
@if ($link-hover-decoration != underline) { text-decoration: $link-hover-decoration; }
background-color: var(--#{$prefix}btn-hover-bg);
border-color: var(--#{$prefix}btn-hover-border-color);
}
Expand Down
2 changes: 1 addition & 1 deletion scss/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

.card-link {
&:hover {
text-decoration: if($link-hover-decoration == underline, none, null);
@if ($link-hover-decoration != underline) { text-decoration: $link-hover-decoration; }
}

+ .card-link {
Expand Down
4 changes: 2 additions & 2 deletions scss/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
font-weight: $font-weight-normal;
color: var(--#{$prefix}dropdown-link-color);
text-align: inherit; // For `<button>`s
text-decoration: if($link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, $link-decoration);
white-space: nowrap; // prevent links from randomly breaking onto new lines
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
Expand All @@ -189,7 +189,7 @@
&:hover,
&:focus {
color: var(--#{$prefix}dropdown-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
@if ($link-hover-decoration != underline) { text-decoration: $link-hover-decoration; }
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
}

Expand Down
2 changes: 1 addition & 1 deletion scss/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
display: block;
padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
color: var(--#{$prefix}list-group-color);
text-decoration: if($link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, $link-decoration);
background-color: var(--#{$prefix}list-group-bg);
border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);

Expand Down
4 changes: 2 additions & 2 deletions scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
@include font-size(var(--#{$prefix}nav-link-font-size));
font-weight: var(--#{$prefix}nav-link-font-weight);
color: var(--#{$prefix}nav-link-color);
text-decoration: if($link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, $link-decoration);
background: none;
border: 0;
@include transition($nav-link-transition);

&:hover,
&:focus {
color: var(--#{$prefix}nav-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
@if ($link-hover-decoration != underline) { text-decoration: $link-hover-decoration; }
}

&:focus-visible {
Expand Down
4 changes: 2 additions & 2 deletions scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
margin-right: var(--#{$prefix}navbar-brand-margin-end);
@include font-size(var(--#{$prefix}navbar-brand-font-size));
color: var(--#{$prefix}navbar-brand-color);
text-decoration: if($link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, $link-decoration);
white-space: nowrap;

&:hover,
&:focus {
color: var(--#{$prefix}navbar-brand-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
@if ($link-hover-decoration != underline) { text-decoration: $link-hover-decoration; }
}
}

Expand Down
4 changes: 2 additions & 2 deletions scss/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
@include font-size(var(--#{$prefix}pagination-font-size));
color: var(--#{$prefix}pagination-color);
text-decoration: if($link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, $link-decoration);
background-color: var(--#{$prefix}pagination-bg);
border: var(--#{$prefix}pagination-border-width) solid var(--#{$prefix}pagination-border-color);
@include transition($pagination-transition);

&:hover {
z-index: 2;
color: var(--#{$prefix}pagination-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
@if ($link-hover-decoration != underline) { text-decoration: $link-hover-decoration; }
background-color: var(--#{$prefix}pagination-hover-bg);
border-color: var(--#{$prefix}pagination-hover-border-color);
}
Expand Down