|
| 1 | +@use 'sass:math'; |
| 2 | + |
1 | 3 | @mixin flex-center { |
2 | 4 | display: flex; |
3 | 5 | justify-content: center; |
4 | 6 | align-items: center; |
5 | 7 | } |
6 | 8 |
|
7 | 9 | nav { |
8 | | - background-color: var(--color-background-secondary-translucent); |
| 10 | + // background-color: var(--color-background-secondary-translucent); |
9 | 11 | user-select: none; |
10 | 12 | position: fixed; |
11 | 13 | top: 0; |
12 | 14 | left: 0; |
13 | 15 | right: 0; |
14 | 16 | z-index: 1000; |
15 | | - backdrop-filter: var(--filter-blur); |
| 17 | + // backdrop-filter: var(--filter-blur); |
16 | 18 | transition: height 0.4s cubic-bezier(0.86, 0, 0.07, 1); |
17 | 19 |
|
18 | 20 | .inner { |
@@ -153,7 +155,7 @@ nav { |
153 | 155 | } |
154 | 156 | } |
155 | 157 |
|
156 | | - &.open { |
| 158 | + .nav-open & { |
157 | 159 | height: var(--open-height); |
158 | 160 |
|
159 | 161 | .title { |
@@ -195,3 +197,38 @@ nav { |
195 | 197 | } |
196 | 198 | } |
197 | 199 | } |
| 200 | + |
| 201 | +.masked > [order] { |
| 202 | + position: fixed; |
| 203 | + top: 0; |
| 204 | + left: 0; |
| 205 | + right: 0; |
| 206 | + // background-color: var(--color-background-secondary-translucent); |
| 207 | + background-color: rgba(0, 0, 0, 0.25); |
| 208 | + backdrop-filter: blur(10px); |
| 209 | + mask-image: linear-gradient(to bottom, #000, transparent); |
| 210 | + -webkit-mask-composite: destination-in; |
| 211 | + pointer-events: none; |
| 212 | + z-index: 1000; |
| 213 | + transition: |
| 214 | + height 0.6s cubic-bezier(0.86, 0, 0.07, 1), |
| 215 | + backdrop-filter 0.6s cubic-bezier(0.86, 0, 0.07, 1); |
| 216 | + |
| 217 | + .nav-open & { |
| 218 | + backdrop-filter: blur(36px); |
| 219 | + } |
| 220 | + |
| 221 | + --height: 100px; |
| 222 | + $base: 1.2; |
| 223 | + @for $i from 1 through 6 { |
| 224 | + &[order='#{$i}'] { |
| 225 | + height: calc(var(--height) / math.pow(($base), ($i - 1))); |
| 226 | + |
| 227 | + @media (max-width: 600px) { |
| 228 | + .nav-open & { |
| 229 | + height: calc(var(--open-height) * 3 / math.pow(($base), ($i - 1))); |
| 230 | + } |
| 231 | + } |
| 232 | + } |
| 233 | + } |
| 234 | +} |
0 commit comments