1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 00:29:52 +02:00

border utils, css/sass vars, and more

This commit is contained in:
Mark Otto
2025-06-10 09:10:46 -07:00
parent 5668e10473
commit a9df5dd0e3
6 changed files with 127 additions and 84 deletions

View File

@@ -6,17 +6,18 @@
@layer helpers {
@each $color, $value in $theme-colors {
.link-#{$color} {
color: color-mix(in srgb, var(--#{$prefix}#{$color}), transparent var(--#{$prefix}link-opacity));
--#{$prefix}link-color: var(--#{$prefix}#{$color});
// color: var(--#{$prefix}#{$color});
text-decoration-color: color-mix(in srgb, var(--#{$prefix}#{$color}), transparent var(--#{$prefix}link-underline-opacity));
@if $link-shade-percentage != 0 {
&:hover,
&:focus {
$hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
color: color-mix(in srgb, $hover-color, transparent var(--#{$prefix}link-opacity));
text-decoration-color: color-mix(in srgb, $hover-color, transparent var(--#{$prefix}link-underline-opacity));
}
}
// @if $link-shade-percentage != 0 {
// &:hover,
// &:focus {
// $hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
// color: color-mix(in srgb, $hover-color, transparent var(--#{$prefix}link-opacity));
// text-decoration-color: color-mix(in srgb, $hover-color, transparent var(--#{$prefix}link-underline-opacity));
// }
// }
}
}