From a3991f2f4c340ff5bb27b94c871b19aa7915ee3a Mon Sep 17 00:00:00 2001 From: oyessb <47382101+oyessb@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:28:31 +0100 Subject: [PATCH 1/3] Remove heigh calculations for mainContainer. New height set to 100 percent --- .../pages/TableViewer/TableViewer.module.scss | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/packages/pxweb2/src/app/pages/TableViewer/TableViewer.module.scss b/packages/pxweb2/src/app/pages/TableViewer/TableViewer.module.scss index 474715997..2e9a4f08b 100644 --- a/packages/pxweb2/src/app/pages/TableViewer/TableViewer.module.scss +++ b/packages/pxweb2/src/app/pages/TableViewer/TableViewer.module.scss @@ -18,9 +18,7 @@ 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) { @@ -28,32 +26,6 @@ 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); From 5e159d8f3a532baa127c3e309f7a38104a1d5ca3 Mon Sep 17 00:00:00 2001 From: oyessb <47382101+oyessb@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:32:07 +0100 Subject: [PATCH 2/3] Make navigationRail and NavigationDrawer sticky --- .../NavigationDrawer/NavigationDrawer.module.scss | 13 ++++++++----- .../NavigationRail/NavigationRail.module.scss | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/pxweb2/src/app/components/NavigationDrawer/NavigationDrawer.module.scss b/packages/pxweb2/src/app/components/NavigationDrawer/NavigationDrawer.module.scss index a9ca749e5..98879a5d1 100644 --- a/packages/pxweb2/src/app/components/NavigationDrawer/NavigationDrawer.module.scss +++ b/packages/pxweb2/src/app/components/NavigationDrawer/NavigationDrawer.module.scss @@ -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)); @@ -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); } } diff --git a/packages/pxweb2/src/app/components/NavigationMenu/NavigationRail/NavigationRail.module.scss b/packages/pxweb2/src/app/components/NavigationMenu/NavigationRail/NavigationRail.module.scss index 182825eeb..c71f13951 100644 --- a/packages/pxweb2/src/app/components/NavigationMenu/NavigationRail/NavigationRail.module.scss +++ b/packages/pxweb2/src/app/components/NavigationMenu/NavigationRail/NavigationRail.module.scss @@ -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 { From f57f0aca8b9053cc78b104ee90db1cdaa333ecf9 Mon Sep 17 00:00:00 2001 From: oyessb <47382101+oyessb@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:33:18 +0100 Subject: [PATCH 3/3] Set overflow to hidden for contentContainer --- .../src/app/components/Presentation/Presentation.module.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/pxweb2/src/app/components/Presentation/Presentation.module.scss b/packages/pxweb2/src/app/components/Presentation/Presentation.module.scss index 4debccc0a..b7b092358 100644 --- a/packages/pxweb2/src/app/components/Presentation/Presentation.module.scss +++ b/packages/pxweb2/src/app/components/Presentation/Presentation.module.scss @@ -7,6 +7,7 @@ background: var(--px-color-surface-default); align-self: stretch; position: relative; + overflow: hidden; container-type: inline-size; container-name: contentCont;