update theme

This commit is contained in:
2026-10-09 11:19:56 +07:00
parent 5c15b0e840
commit 70540abd5d
11 changed files with 137 additions and 27 deletions
+16 -1
View File
@@ -109,6 +109,21 @@ fn brand_tint_rotates_greys_and_keeps_semantics() {
);
}
#[test]
fn warning_wash_carries_its_label() {
// warning_muted is a translucent amber wash, so the label pairing is
// measured against the plate flattened onto the content plane.
for appearance in [ThemeMode::Dark, ThemeMode::Light] {
let colors = ThemeColors::for_appearance(appearance);
let plate = flatten(colors.warning_muted, colors.bg);
assert!(
ratio(colors.warning, plate) >= 3.0,
"{appearance:?}: warning on warning_muted = {}",
ratio(colors.warning, plate)
);
}
}
#[test]
fn legacy_aliases_track_tokens() {
for appearance in [ThemeMode::Dark, ThemeMode::Light] {
@@ -118,7 +133,7 @@ fn legacy_aliases_track_tokens() {
assert_eq!(colors.text_placeholder, colors.text_faint);
assert_eq!(colors.element_background, colors.solid);
assert_eq!(colors.secondary_background, colors.surface_raised);
assert_eq!(colors.tab_active_background, colors.bg);
assert_eq!(colors.tab_active_background, colors.element_active);
}
}