mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 20:54:22 +01:00
34 lines
2.1 KiB
SCSS
34 lines
2.1 KiB
SCSS
@use "../functions";
|
|
@use "../variables";
|
|
|
|
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
|
|
@each $color, $value in variables.$theme-colors {
|
|
.link-#{$color} {
|
|
color: RGBA(var(--#{variables.$prefix}#{$color}-rgb), var(--#{variables.$prefix}link-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
|
|
text-decoration-color: RGBA(var(--#{variables.$prefix}#{$color}-rgb), var(--#{variables.$prefix}link-underline-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
|
|
|
|
@if variables.$link-shade-percentage != 0 {
|
|
&:hover,
|
|
&:focus {
|
|
$hover-color: if(functions.color-contrast($value) == variables.$color-contrast-light, functions.shade-color($value, variables.$link-shade-percentage), functions.tint-color($value, variables.$link-shade-percentage));
|
|
color: RGBA(#{functions.to-rgb($hover-color)}, var(--#{variables.$prefix}link-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
|
|
text-decoration-color: RGBA(functions.to-rgb($hover-color), var(--#{variables.$prefix}link-underline-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// One-off special link helper as a bridge until v6
|
|
.link-body-emphasis {
|
|
color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
|
|
text-decoration-color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-underline-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
|
|
|
|
@if variables.$link-shade-percentage != 0 {
|
|
&:hover,
|
|
&:focus {
|
|
color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-opacity, .75)) if(variables.$enable-important-utilities, !important, null);
|
|
text-decoration-color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-underline-opacity, .75)) if(variables.$enable-important-utilities, !important, null);
|
|
}
|
|
}
|
|
}
|