Skip to content

Commit

Permalink
fix sm width
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Jun 28, 2024
1 parent 5a43527 commit 597c99b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
19 changes: 12 additions & 7 deletions packages/sit-onyx/src/components/OnyxNavBar/OnyxNavBar.ct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,17 @@ Object.entries(ONYX_BREAKPOINTS).forEach(([breakpoint, width]) => {

await expect(page).toHaveScreenshot(`grid-default-${breakpoint}.png`);

const app = page.locator(".onyx-app");

await app.evaluate((element) => element.classList.add("onyx-grid-max-md"));
await expect(page).toHaveScreenshot("grid-max-width-${}.png");

await app.evaluate((element) => element.classList.add("onyx-grid-center"));
await expect(page).toHaveScreenshot(`grid-max-center-${breakpoint}.png`);
// eslint-disable-next-line playwright/no-conditional-in-test -- prevent useless screenshots for breakpoints that don't have a max width
if (width > ONYX_BREAKPOINTS.md) {
const app = page.locator(".onyx-app");

await app.evaluate((element) => element.classList.add("onyx-grid-max-md"));
// eslint-disable-next-line playwright/no-conditional-expect
await expect(page).toHaveScreenshot(`grid-max-width-${breakpoint}.png`);

await app.evaluate((element) => element.classList.add("onyx-grid-center"));
// eslint-disable-next-line playwright/no-conditional-expect
await expect(page).toHaveScreenshot(`grid-max-center-${breakpoint}.png`);
}
});
});
5 changes: 0 additions & 5 deletions packages/sit-onyx/src/components/OnyxNavBar/OnyxNavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ provide(MOBILE_NAV_BAR_INJECTION_KEY, isMobile);

<style lang="scss">
@use "../../styles/mixins/layers";
@use "../../styles/breakpoints.scss";
$gap: var(--onyx-spacing-md);
$height: 3.5rem;
Expand Down Expand Up @@ -205,10 +204,6 @@ $height: 3.5rem;
// sync with grid
max-width: var(--onyx-grid-max-width);
margin-inline: var(--onyx-grid-margin-inline);
@include breakpoints.container(max, sm) {
padding-inline: var(--onyx-spacing-xl);
}
}
&__back {
Expand Down

0 comments on commit 597c99b

Please sign in to comment.