1441 |
ariadna |
1 |
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
|
|
|
2 |
@each $color, $value in $theme-colors {
|
|
|
3 |
.link-#{$color} {
|
|
|
4 |
color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
|
|
|
5 |
text-decoration-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
|
|
|
6 |
|
|
|
7 |
@if $link-shade-percentage != 0 {
|
|
|
8 |
&:hover,
|
|
|
9 |
&:focus {
|
|
|
10 |
$hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
|
|
|
11 |
color: RGBA(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
|
|
|
12 |
text-decoration-color: RGBA(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
|
|
|
13 |
}
|
|
|
14 |
}
|
|
|
15 |
}
|
|
|
16 |
}
|
|
|
17 |
|
|
|
18 |
// One-off special link helper as a bridge until v6
|
|
|
19 |
.link-body-emphasis {
|
|
|
20 |
color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
|
|
|
21 |
text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
|
|
|
22 |
|
|
|
23 |
@if $link-shade-percentage != 0 {
|
|
|
24 |
&:hover,
|
|
|
25 |
&:focus {
|
|
|
26 |
color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if($enable-important-utilities, !important, null);
|
|
|
27 |
text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if($enable-important-utilities, !important, null);
|
|
|
28 |
}
|
|
|
29 |
}
|
|
|
30 |
}
|