update theme
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user