fix(ui): prevent full bleed hero overflow
This commit is contained in:
@@ -280,22 +280,14 @@ component Hero {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wrn-hero[data-full-bleed="true"] {
|
.wrn-hero[data-full-bleed="true"] {
|
||||||
width: 100vw;
|
width: 100%;
|
||||||
max-width: 100vw;
|
max-width: 100%;
|
||||||
margin-inline: calc(50% - 50vw);
|
margin-inline: 0;
|
||||||
border-right-width: 0;
|
border-right-width: 0;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
border-radius: 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[data-color="secondary"] {
|
||||||
--wrn-hero-accent: var(--wrn-color-secondary);
|
--wrn-hero-accent: var(--wrn-color-secondary);
|
||||||
--wrn-hero-accent-soft: var(--wrn-color-secondary-soft, var(--wrn-color-primary-soft));
|
--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", () => {
|
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 () => {
|
test("contains every replacement and new component", async () => {
|
||||||
const files = new Set(await readdir(componentsDir));
|
const files = new Set(await readdir(componentsDir));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user