fix(grid): darken selected-cell border and align paint theme fallbacks
Two CI failures blocked the previous revision: - The branch was 592 commits behind main, so it still carried the dataGridSelectionContrast snapshot test that upstream has since removed. Rebased on the current main, which drops it. - dataGridPaintTheme.spec.ts asserts a contrast ratio of at least 3 between the selected-cell border and fill. Against the deeper rgb(179, 208, 254) fill the old rgb(59, 130, 246) border only reached 2.34, so the light border is darkened to rgb(37, 99, 235) (3.29). The paint theme fallback constants and the spec expectations are updated to match, so the rendered color and the resolved tokens stay in sync.
This commit is contained in:
1 parent
bc74d5a73e
commit
dd4d099e30
3 files changed
+8
-8
No files matched your search
@@ -162,8 +162,8 @@ describe("data grid paint theme", () => {
|
||||
isDark: true,
|
||||
});
|
||||
|
||||
expect(light.cellSelected).toBe("rgb(239, 246, 255)");
|
||||
expect(light.cellSelectedBorder).toBe("rgb(59, 130, 246)");
|
||||
expect(light.cellSelected).toBe("rgb(179, 208, 254)");
|
||||
expect(light.cellSelectedBorder).toBe("rgb(37, 99, 235)");
|
||||
expect(light.cellSelectedSingle).toBe("rgb(191, 219, 254)");
|
||||
expect(light.cellSelectedDirty).toBe("rgb(235, 224, 184)");
|
||||
expect(light.cellDirty).toBe("rgb(255, 248, 230)");
|
||||
@@ -171,7 +171,7 @@ describe("data grid paint theme", () => {
|
||||
expect(light.rowNumberTextEdited).toBe("rgb(187, 77, 0)");
|
||||
expect(contrastRatio(light.cellSelectedBorder, light.cellSelected)).toBeGreaterThanOrEqual(3);
|
||||
|
||||
expect(dark.cellSelected).toBe("rgb(20, 40, 60)");
|
||||
expect(dark.cellSelected).toBe("rgb(30, 64, 100)");
|
||||
expect(dark.cellSelectedBorder).toBe("rgb(96, 165, 250)");
|
||||
expect(dark.cellSelectedSingle).toBe("rgb(30, 64, 96)");
|
||||
expect(dark.cellSelectedDirty).toBe("rgb(76, 66, 38)");
|
||||
|
||||
Reference in new issue
Block a user