fix(ui): prevent full bleed hero overflow
Quality / quality (windows-latest) (push) Waiting to run
Quality / quality (ubuntu-latest) (push) Failing after 10m42s

This commit is contained in:
2026-08-25 17:30:34 +05:30
parent 7e1eb899b3
commit 138b5d0950
2 changed files with 10 additions and 11 deletions
+3 -11
View File
@@ -280,22 +280,14 @@ component Hero {
}
.wrn-hero[data-full-bleed="true"] {
width: 100vw;
max-width: 100vw;
margin-inline: calc(50% - 50vw);
width: 100%;
max-width: 100%;
margin-inline: 0;
border-right-width: 0;
border-left-width: 0;
border-radius: 0;
}
@supports (width: 100dvw) {
.wrn-hero[data-full-bleed="true"] {
width: 100dvw;
max-width: 100dvw;
margin-inline: calc(50% - 50dvw);
}
}
.wrn-hero[data-color="secondary"] {
--wrn-hero-accent: var(--wrn-color-secondary);
--wrn-hero-accent-soft: var(--wrn-color-secondary-soft, var(--wrn-color-primary-soft));
@@ -78,6 +78,13 @@ function openingTags(source: string): string[] {
}
describe("@wrnexus/ui redesign component pack", () => {
test("Hero full bleed does not use scrollbar-sensitive viewport units", async () => {
const source = await readFile(join(componentsDir, "Hero.wrn"), "utf8");
expect(source).not.toContain("width: 100vw");
expect(source).not.toContain("width: 100dvw");
expect(source).toContain('.wrn-hero[data-full-bleed="true"]');
});
test("contains every replacement and new component", async () => {
const files = new Set(await readdir(componentsDir));