Fix mobile header menu button jumping position on toggle
The button's top offset was unset, so its absolute-position static position was recomputed from the flex-wrap layout whenever .sc-nav wrapped onto its own row on open, causing a visible vertical jump. Pinning top to the header's mobile padding keeps it stationary. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9f64bdc591
commit
d4d2c49538
1 file changed
+4
@@ -1181,8 +1181,12 @@
|
|||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* top is pinned explicitly: with it unset, the button's static-position offset is
|
||||||
|
recomputed from the flex-wrap layout, which changes height once .sc-nav wraps onto
|
||||||
|
its own row on open - so the button visibly jumps vertically on click. */
|
||||||
.sc-mobile-menu-button {
|
.sc-mobile-menu-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
top: 0.75rem;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
display: grid;
|
display: grid;
|
||||||
order: 3;
|
order: 3;
|
||||||
|
|||||||
Reference in new issue
Block a user