Skip to content

Commit

Permalink
HPC-9276: Improve responsiveness for section menu styling
Browse files Browse the repository at this point in the history
  • Loading branch information
berliner committed Nov 4, 2023
1 parent 6fb987b commit b004e4a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion html/themes/custom/common_design_subtheme/css/styles.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ ul.links--entity-navigation {
padding-right: var(--cd-container-padding);
padding-left: var(--cd-container-padding);

&.megamenu-wrapper-outer {
max-width: 100vw;
}

.megamenu-header {
margin-bottom: 1rem;
padding-top: 1rem;
Expand All @@ -121,6 +125,7 @@ ul.links--entity-navigation {
margin-bottom: 0;

a {
white-space: normal;
font-size: var(--cd-font-size--2xbase);
}
}
Expand Down Expand Up @@ -253,6 +258,30 @@ ul.links--entity-navigation {
&.overflow-item.expandable > div[data-cd-hidden=false] {
padding-top: 0;
padding-bottom: 0;

.second-level-wrapper-outer div[data-cd-hidden=false] {
position: relative;
top: 0;
width: calc(100vw - 3 * var(--cd-container-padding));
max-width: calc(100vw - 3 * var(--cd-container-padding));

.megamenu-wrapper-outer {
padding-right: 0;
padding-left: 0;

@include tablet {
padding-right: var(--cd-container-padding-xlarge);
padding-left: var(--cd-container-padding-xlarge);
}
}

@include tablet {
position: absolute;
top: 3.5rem;
width: 100%;
max-width: 100%;
}
}
}
}
}
Expand Down Expand Up @@ -283,6 +312,15 @@ ul.links--entity-navigation {
position: initial;
flex-direction: row;
gap: 2rem;

li.expandable.megamenu {
position: static;

div[data-cd-hidden=false] {
width: 100%;
max-width: 100%;
}
}
}
}
}

0 comments on commit b004e4a

Please sign in to comment.