Contrast fixes

This commit is contained in:
ThePetrovich 2026-09-19 16:49:53 +08:00
parent be164cfe0a
commit 25ade09b0c
31 changed files with 471 additions and 378 deletions

View file

@ -34,6 +34,7 @@
.alert-link {
font-weight: $alert-link-font-weight;
color: var(--#{$prefix}alert-link-color);
text-decoration: underline;
}
@ -69,7 +70,13 @@
--#{$prefix}alert-color: #{color-contrast($value)};
--#{$prefix}alert-bg: #{$value};
--#{$prefix}alert-border-color: #{$value};
--#{$prefix}alert-link-color: #{shade-color(color-contrast($value), 10%)};
// The link deliberately keeps the alert's own text color. These alerts are
// solid and saturated, so `--#{$prefix}alert-color` is already at maximum
// contrast against the fill; any shade or tint of it can only reduce
// contrast. (The previous `shade-color(color-contrast($value), 10%)` shaded
// *white* to #e6e6e6 on the six dark alerts, making links dimmer than the
// surrounding text.) Emphasis comes from weight and the underline instead.
--#{$prefix}alert-link-color: var(--#{$prefix}alert-color);
}
}
// scss-docs-end alert-modifiers