fix(studio): centre tab labels and icons in the tab height

Also points the hovered-tab contrast pair at the lines that declare it.
This commit is contained in:
Miguel Ángel
2026-09-23 01:22:30 -04:00
parent eefaa839e4
commit 8079c63541
3 changed files with 10 additions and 2 deletions
@@ -130,10 +130,12 @@
width 140ms ease-out;
}
/* Fills dockview's tab part, so the label and icon centre in the tab's full height. */
.hf-dock-tab {
display: flex;
align-items: center;
gap: 6px;
height: 100%;
}
.hf-dock .dv-inactive-tab .hf-dock-tab-icon,
@@ -68,6 +68,12 @@ describe("dock panel strip contract", () => {
expect(reduced).toContain(".hf-dock-tab-icon { animation: none; }");
});
it("centres the tab's icon and label in the tab's full height", () => {
const tab = bodyOf(".hf-dock-tab");
expect(tab).toContain("height: 100%");
expect(tab).toContain("align-items: center");
});
it("takes every colour from a token", () => {
expect(dockCss).not.toMatch(/#[0-9a-f]{3,8}\b|rgba?\(|hsla?\(|oklch\(/i);
});
+2 -2
View File
@@ -300,8 +300,8 @@
"role": "text",
"minimum": 4.5,
"sources": [
"packages/studio/src/components/dock/dock.css:97",
"packages/studio/src/components/dock/dock.css:99"
"packages/studio/src/components/dock/dock.css:101",
"packages/studio/src/components/dock/dock.css:103"
]
}
]