Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove dvh/dvw backwards compatibility #3228

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/elements/menu/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--sbb-menu-max-width: 100%;
--sbb-menu-min-width: 100%;
--sbb-menu-inset: 0 auto auto 0;
--sbb-menu-container-height: 100vh;
--sbb-menu-container-height: 100dvh;

// 85vh is not an exact value but looks optimized for mobile view.
--sbb-menu-max-height: calc(85vh - var(--sbb-spacing-fixed-8x));
Expand All @@ -29,12 +29,6 @@
--sbb-menu-visibility: hidden;
--sbb-menu-backdrop-color: transparent;

// Needed for backwards compatibility
// TODO: Remove once not needed
@supports (height: 100dvh) {
--sbb-menu-container-height: 100dvh;
}

@include sbb.mq($from: medium) {
--sbb-menu-transform: translateY(var(--sbb-spacing-fixed-2x));
--sbb-menu-max-width: #{sbb.px-to-rem-build(320)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
--sbb-navigation-section-transform: translateX(100%);
--sbb-navigation-section-content-padding-inline-start: var(--sbb-spacing-fixed-12x);
--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);
--sbb-navigation-section-width: 100vw;
--sbb-navigation-section-height: 100vh;
--sbb-navigation-section-width: 100dvw;
--sbb-navigation-section-height: 100dvh;

// We have to place the styles on the host as it has to be aligned on the grid of the navigation
display: var(--sbb-navigation-section-display);
Expand All @@ -31,18 +31,6 @@
height: var(--sbb-navigation-section-height);
z-index: var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index));

// Needed for backwards compatibility
// TODO: Remove once not needed
@supports (width: 100dvw) {
--sbb-navigation-section-width: 100dvw;
}

// Needed for backwards compatibility
// TODO: Remove once not needed
@supports (height: 100dvh) {
--sbb-navigation-section-height: 100dvh;
}

@include sbb.mq($from: large) {
--sbb-navigation-section-column: 5 / 9;
--sbb-navigation-section-animation-duration: var(
Expand Down
8 changes: 1 addition & 7 deletions src/elements/navigation/navigation/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
--sbb-navigation-transform: translateX(-100%);
--sbb-navigation-content-transform: translateX(0);
--sbb-navigation-width: 100%;
--sbb-navigation-height: 100vh;
--sbb-navigation-height: 100dvh;
--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);

display: block;
Expand All @@ -40,12 +40,6 @@
z-index: var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index));
overflow: hidden;

// Needed for backwards compatibility
// TODO: Remove once not needed
@supports (height: 100dvh) {
--sbb-navigation-height: 100dvh;
}

@include sbb.mq($from: medium) {
--sbb-navigation-grid-column: 1 / 9;
}
Expand Down
Loading