Style shared scrollbars

This commit is contained in:
npc0-hue
2026-08-05 18:08:01 +08:00
parent 5fbe8092b9
commit d8d07914da
2 changed files with 16 additions and 0 deletions
+10
View File
@@ -40,6 +40,16 @@ describe("platform web shared theme CSS", () => {
expect(css).toContain(".runtime-task-meter-track{height:10px");
});
it("themes shared scrollbars instead of exposing browser-default gutters", () => {
const css = compact(readThemeCss());
expect(css).toContain(":root[data-theme-palette],:root[data-theme-palette]*{scrollbar-color:color-mix(insrgb,var(--accent)62%,var(--surface-solid))color-mix(insrgb,var(--surface-solid)62%,transparent);scrollbar-width:thin}");
expect(css).toContain(":root[data-theme-palette]::-webkit-scrollbar,:root[data-theme-palette]*::-webkit-scrollbar{width:10px;height:10px}");
expect(css).toContain(":root[data-theme-palette]::-webkit-scrollbar-thumb,:root[data-theme-palette]*::-webkit-scrollbar-thumb{min-height:42px;border:2pxsolid");
expect(css).toContain("background:linear-gradient(180deg,color-mix(insrgb,var(--accent)62%,var(--surface-solid)),color-mix(insrgb,var(--gold)46%,var(--accent)))");
expect(css).toContain("::-webkit-scrollbar-corner");
});
it("keeps server card stat tiles readable over busy backgrounds", () => {
const css = compact(readThemeCss());