Skip to content

Commit

Permalink
fix: void nav background overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Nov 13, 2024
1 parent 951ce62 commit 305a635
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,9 @@ function NavHeaderLeftFullWidthBackground() {
return (
<>
<div
className="show-on-nav-hover add-transition"
className="nav-bg show-on-nav-hover add-transition"
style={{
height: '100%',
width: '100cqw',
zIndex: -1,
background: 'var(--bg-color)',
position: 'absolute',
Expand All @@ -410,6 +409,16 @@ function NavHeaderLeftFullWidthBackground() {
borderBottom: 'var(--block-margin) solid white',
}}
/>
<Style>{
// (min-width: 0px) => trick to always apply => @container seems to always require a condition
css`
@container container-viewport (min-width: 0px) {
.nav-bg {
width: 100cqw;
}
}
`
}</Style>
</>
)
}
Expand Down

0 comments on commit 305a635

Please sign in to comment.