Skip to content

Commit 812bd79

Browse files
committed
fix(nav): keep navbar menus inside tablet viewports
Between 768px and 1023px the desktop navbar is kept, but daisyUI anchors each dropdown menu to its trigger's left edge. The rightmost menu (theme) therefore runs past the viewport and adds a page-wide horizontal scrollbar (up to 22px at 768px). Anchor the menus to their trigger's right edge instead, matching what the phone breakpoint already does. Wider layouts are unchanged.
1 parent 7d76253 commit 812bd79

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎web/static/src/mobile.css‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,17 @@
442442

443443
}
444444

445+
/* Tablets keep the desktop navbar, but daisyUI anchors every menu to its
446+
trigger's left edge, so the rightmost menu (theme) runs past the viewport
447+
and adds a page-wide horizontal scrollbar. Anchor the menus to their
448+
trigger's right edge instead, as the phone breakpoint already does. */
449+
@media (min-width: 768px) and (max-width: 1023px) {
450+
.app-container > .navbar .dropdown > .dropdown-content {
451+
left: auto;
452+
right: 0;
453+
}
454+
}
455+
445456
/* mobile-footer-clean-test-v1 */
446457
@media (max-width: 768px) {
447458
.atv-refresh-footer-note {

0 commit comments

Comments
 (0)
⌂ 换网址