mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-14 22:18:19 +00:00
Scope sidebar nav rules to the direct child nav (#211)
The sidebar rules matched every nav inside .sidebar, so a nested tablist nav became fixed, column, sidebar-width. Use .sidebar > nav in the component CSS, all style packs and sidebar.js. Co-authored-by: grugbraindev <178141691+grugbraindev@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@
|
||||
|
||||
const handleClick = (event) => {
|
||||
const target = event.target;
|
||||
const nav = sidebarComponent.querySelector('nav');
|
||||
const nav = sidebarComponent.querySelector(':scope > nav');
|
||||
const isMobile = window.innerWidth < breakpoint;
|
||||
|
||||
if (isMobile && target.closest('a, button') && !target.closest('[data-keep-mobile-sidebar-open]')) {
|
||||
|
||||
Reference in New Issue
Block a user