Skip to content

Commit 6bb344f

Browse files
committed
fix(docs-infra): improve version picker dropdown positioning
Drops `position: absolute` from the version picker `<ul>` and tightens `max-height` to `70dvh` so the cdk-overlay-pane fits the viewport and the inner scroll reaches the last versions on mobile and desktop.
1 parent e3dc87c commit 6bb344f

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

adev/src/app/core/layout/navigation/mini-menu.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// ul
55
.adev-mini-menu {
66
padding: 0;
7+
margin-block: 0;
78
color: var(--primary-contrast);
89
background-color: var(--page-background);
910
border: 1px solid var(--senary-contrast);
@@ -86,11 +87,8 @@
8687

8788
.adev-version-picker {
8889
overflow-y: auto;
89-
max-height: 90vh;
90-
top: 30px;
91-
left: 10px;
92-
position: absolute;
93-
bottom: auto;
90+
max-height: 70dvh;
91+
margin-inline-start: 10px;
9492

9593
li {
9694
padding-inline: 0;
@@ -101,9 +99,11 @@
10199
}
102100

103101
@include mq.for-tablet {
104-
top: 30px;
105-
left: auto;
106-
bottom: auto;
102+
position: fixed;
103+
position-anchor: --version-trigger;
104+
inset-block-start: calc(anchor(bottom) + 8px);
105+
justify-self: anchor-center;
106+
margin-inline-start: 0;
107107
}
108108
}
109109

adev/src/app/core/layout/navigation/navigation.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175

176176
// version dropdown button
177177
.adev-version-button {
178+
anchor-name: --version-trigger;
178179
border: 1px solid var(--senary-contrast);
179180
border-radius: 0.25rem;
180181
width: fit-content;

0 commit comments

Comments
 (0)