Skip to main content

max / makeover-webview

Link colour reads --action, the token themes actually define --action-primary was emitted by link_rules and has never been defined by any theme, so every .link dropped its colour declaration outright and fell back to inherited text. The hover arm two lines below was always --action-hover. Valid CSS either way, which is why nothing caught it until MNW's no-undefined-token lint ran at commit time under the new canonical hook.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-14 14:36 UTC
Signed with PGP, not checked
Commit: 453f32a533e8ed30cce368df29958123d597d28c
Parent: 1d03ac0
1 file changed, +15 insertions, -1 deletion
M src/lib.rs +15 -1
@@ -732,7 +732,7 @@
732 732
733 733 let _ = writeln!(
734 734 css,
735 - ".{link} {{\n color: var(--action-primary);\n \
735 + ".{link} {{\n color: var(--action);\n \
736 736 text-decoration: underline;\n}}"
737 737 );
738 738 // The hover step is the same one every other control takes, and it is a
@@ -1726,6 +1726,20 @@
1726 1726 assert_eq!(part_class(RowPart::Meta), "row-meta");
1727 1727 }
1728 1728
1729 + #[test]
1730 + fn a_link_takes_the_action_colour_the_theme_actually_defines() {
1731 + // `--action-primary` shipped here for months and no theme has ever
1732 + // defined it, so every `.link` dropped its colour declaration outright
1733 + // and fell back to inherited text. Nothing caught it because the sheet
1734 + // is valid CSS either way; MNW's no-undefined-token lint is what found
1735 + // it, 2026-08-14. The hover arm two lines below was always `--action-hover`,
1736 + // which is what makes the typo legible in hindsight.
1737 + let css = link_rules(&Emit::default());
1738 + assert!(css.contains("color: var(--action);"));
1739 + assert!(!css.contains("--action-primary"));
1740 + assert!(css.contains("color: var(--action-hover);"));
1741 + }
1742 +
1729 1743 #[test]
1730 1744 fn the_progress_trough_is_a_well() {
1731 1745 let css = progress_rules(&Emit::default());