fix: align mobile footer navigation
This commit is contained in:
@@ -103,6 +103,7 @@
|
|||||||
gap: clamp(0.625rem, 3.23vw, 0.8125rem) clamp(1.59375rem, 7.96vw, 2rem);
|
gap: clamp(0.625rem, 3.23vw, 0.8125rem) clamp(1.59375rem, 7.96vw, 2rem);
|
||||||
grid-auto-flow: column;
|
grid-auto-flow: column;
|
||||||
grid-template-rows: repeat(3, auto);
|
grid-template-rows: repeat(3, auto);
|
||||||
|
padding-inline-start: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-footer .site-footer__nav-item {
|
.site-footer .site-footer__nav-item {
|
||||||
|
|||||||
@@ -705,12 +705,20 @@ test("mobile footer matches the reference hierarchy", async ({ page }) => {
|
|||||||
const logo = await getBox(footer.locator(".site-footer__logo-image"));
|
const logo = await getBox(footer.locator(".site-footer__logo-image"));
|
||||||
const backToTop = await getBox(footer.locator("#backToTopBtn"));
|
const backToTop = await getBox(footer.locator("#backToTopBtn"));
|
||||||
const nav = await getBox(footer.locator("#footer-nav"));
|
const nav = await getBox(footer.locator("#footer-nav"));
|
||||||
|
const firstNavLink = await getBox(
|
||||||
|
footer.locator(".site-footer__nav-link").first(),
|
||||||
|
);
|
||||||
const contact = await getBox(footer.locator(".contact"));
|
const contact = await getBox(footer.locator(".contact"));
|
||||||
|
const firstContactItem = await getBox(
|
||||||
|
footer.locator(".contact__item").first(),
|
||||||
|
);
|
||||||
|
|
||||||
expectNear(footerBox.height, 673, 12);
|
expectNear(footerBox.height, 673, 12);
|
||||||
expectNear(logo.y, backToTop.y, 8);
|
expectNear(logo.y, backToTop.y, 8);
|
||||||
expect(nav.y).toBeGreaterThan(logo.y + logo.height);
|
expect(nav.y).toBeGreaterThan(logo.y + logo.height);
|
||||||
expect(contact.y).toBeGreaterThan(nav.y + nav.height);
|
expect(contact.y).toBeGreaterThan(nav.y + nav.height);
|
||||||
|
expectNear(firstNavLink.x, logo.x, 2);
|
||||||
|
expectNear(firstNavLink.x, firstContactItem.x, 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("mobile footer scales down and remains contained", async ({ page }) => {
|
test("mobile footer scales down and remains contained", async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user