Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@
border-end-end-radius: var(--px-border-radius-xlarge);
border-end-start-radius: var(--px-border-radius-none);

// Not from Figma
position: absolute;
// Make the drawer sticky under the header
position: sticky;
top: 0;
inset-inline-start: 120px; // Instead of "left" to handle rtl languages
z-index: 999;

// Position NavigationDrawer below the header
top: fixed.$spacing-22;

&.skipToMainContentVisible {
// Calculate position of NavigationDrawer below the header and SkipToMainContent
top: calc(fixed.$spacing-22 + var(--skip-to-main-content-height));
Expand All @@ -86,6 +84,11 @@
width: 396px;
padding: 0px fixed.$spacing-8 fixed.$spacing-8 0px;
border-radius: var(--px-border-radius-none);

// Stick under header
position: sticky;
top: 0;
height: calc(100vh - fixed.$spacing-22);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
// large, xlarge and xxlarge
@media ((min-width: fixed.$breakpoints-large-min-width) and (max-width: fixed.$breakpoints-xlarge-max-width)) or ((min-width: fixed.$breakpoints-xxlarge-min-width)) {
display: flex;
position: sticky;
top: 0;
}

&:focus-visible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
background: var(--px-color-surface-default);
align-self: stretch;
position: relative;
overflow: hidden;

container-type: inline-size;
container-name: contentCont;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,14 @@

display: flex;
background: var(--px-color-surface-subtle);

// Calculate height of main container, minus the header
height: calc(100vh - fixed.$spacing-20);
height: 100%;

// xsmall, small and medium general settings
@media (breakpoints.$xsmall) or (breakpoints.$small) or (breakpoints.$medium) {
background: var(--px-color-surface-default);
width: 100%;
}

// height calculations
@media (breakpoints.$xsmall) or (breakpoints.$small) {
// Calculate height of main container, minus the header and navigation bar heights
height: calc(100vh - fixed.$spacing-19 - 78px);

&.skipToMainContentVisible {
// Calculate height of main container, minus the header and navigation bar and SkipToMainContent heights
height: calc(
100vh - fixed.$spacing-19 -
fixed.$spacing-20 - var(--skip-to-main-content-height)
);
}
}
@media (breakpoints.$medium) {
// Calculate height of main container, minus the header and navigation bar heights
height: calc(100vh - fixed.$spacing-20 - 78px);

&.skipToMainContentVisible {
// Calculate height of main container, minus the header and navigation bar and SkipToMainContent heights
height: calc(
100vh - fixed.$spacing-20 -
fixed.$spacing-20 - var(--skip-to-main-content-height)
);
}
}

// large, xlarge and xxlarge
@media (breakpoints.$large) or (breakpoints.$xlarge) or (breakpoints.$xxlarge) {
width: calc(100% - 120px);
Expand Down