Skip to content

Commit e978b2a

Browse files
committed
update: _nav.scss — format for the new implementation
1 parent 70313c2 commit e978b2a

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

src/assets/scss/components/_nav.scss

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,22 @@
66
flex-shrink: 0;
77
position: sticky;
88
top: 0;
9-
padding: 0.8rem;
109
z-index: 20;
1110

11+
&-skip {
12+
position: relative;
13+
width: 100%;
14+
height: 0;
15+
transition: height 200ms ease;
16+
justify-content: center;
17+
18+
&:has(:focus) {
19+
height: calc(1em + 0.6em);
20+
}
21+
}
22+
1223
&-container {
24+
padding: 0.8rem;
1325
width: 100%;
1426
max-width: 64rem;
1527
margin: 0 auto;
@@ -29,17 +41,22 @@
2941
&-skipto {
3042
background-color: var(--clr-accent);
3143
color: var(--clr-white);
32-
display: flex;
3344
padding: 0 0.3rem;
34-
align-self: center;
35-
scale: 0 1;
36-
order: 2;
37-
transform-origin: left;
38-
transition: scale 200ms ease;
45+
position: absolute !important;
46+
left: 0;
47+
right: 0;
48+
top: 0;
49+
width: 100%;
50+
height: max-content;
51+
text-align: center;
52+
opacity: 0;
53+
transition: opacity 200ms ease;
54+
pointer-events: none;
3955

4056
&:focus {
57+
pointer-events: unset;
58+
opacity: 1;
4159
color: var(--clr-white);
42-
scale: 1;
4360
}
4461
}
4562

0 commit comments

Comments
 (0)