diff --git a/src/Header/Header.css b/src/Header/Header.css index 01ca90b..67f3acb 100644 --- a/src/Header/Header.css +++ b/src/Header/Header.css @@ -42,7 +42,7 @@ header[bt] { } } - &:not(.overflowing):has([bt-navbar-toggler]) { + &:has([bt-navbar-toggler])[bt-large-menu] { & > ul { margin-right: 3.5rem; } @@ -52,7 +52,7 @@ header[bt] { } } - &.overflowing { + &:not([bt-large-menu]) { & > ul { visibility: hidden; } diff --git a/src/Header/Header.ts b/src/Header/Header.ts index 16bb54b..109853f 100644 --- a/src/Header/Header.ts +++ b/src/Header/Header.ts @@ -16,9 +16,9 @@ onElementConnected('header[bt] > nav', (navigation) => { (entries) => { const entry = entries[0]; if (!entry.isIntersecting) { - navigation.classList.add('overflowing'); + navigation.removeAttribute('bt-large-menu'); } else { - navigation.classList.remove('overflowing'); + navigation.setAttribute('bt-large-menu', ''); } }, {