Phase L L3: restyle VST editor + embed strip through the L1 kit (B pastel + spectral strip)

This commit is contained in:
2026-07-27 05:30:44 -04:00
parent 6b643bb089
commit 774d753b4c
5 changed files with 506 additions and 205 deletions
+18
View File
@@ -134,6 +134,23 @@ static void testLabelOnActiveSurfaceClearsFloor() {
CHECK(contrastRatio(labelOnActive, activeFill) >= textFloor(TextClass::Body));
}
// Text drawn on a HOVER-state surface (Phase L, L3): the VST editor + embed restyle lights
// hover on inactive segments/tabs/cards by lightening bg/cell toward accent/hot (~10%).
// Lightening the surface REDUCES contrast against light text, so re-verify the pairs on the
// hover surface, not just on rest bg/cell. (A distinct drawn pair the L3 shells introduce,
// not covered by the rest-surface tests above.)
// - text/PRIMARY (card name, segment/tab labels) is BODY -> must clear AA 4.5:1 even hovered.
// - text/DIM is used ONLY as a compact UI LABEL on a hoverable surface (the card's root/key
// BADGE — the one dim-on-hover pair the restyle draws), so it clears at the 3:1 large/
// UI-label floor, per §2.1's "confine dim to large/UI-label use where the 3:1 floor
// applies." A lightened surface pulls a mid-grey dim toward the body floor; the badge is
// deliberately a label, not body, so 3:1 is the correct floor and this locks it there.
static void testTextOnHoverSurfaceClearsFloor() {
const KitColor hover = roleColorState(Role::BgCell, InteractionState::Hover);
CHECK(contrastRatio(roleColor(Role::TextPrimary), hover) >= textFloor(TextClass::Body));
CHECK(contrastRatio(roleColor(Role::TextDim), hover) >= textFloor(TextClass::Large));
}
// --- Single point of change (structural guarantee) ----------------------------
//
// roleColor is the ONLY color source; there is no other public accessor that yields a
@@ -217,6 +234,7 @@ int main() {
testTextDimClearsItsFloorOnSurfaces();
testAccentsClearIndicatorFloorOnCell();
testTextOnPastelFillClearsBodyFloor();
testTextOnHoverSurfaceClearsFloor();
testSecondaryTertiaryAreDistinguishable();
testWarnClearsStateFloorOnBackground();
testLabelOnActiveSurfaceClearsFloor();