Skip to content

Commit a87148c

Browse files
committed
[design] improve menu layout with tabs
1 parent 6776a6a commit a87148c

File tree

4 files changed

+243
-147
lines changed

4 files changed

+243
-147
lines changed

‎css/menu.css‎

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,83 @@
11
.menu{
22
background-color:var(--gray-02);
33
border-radius:var(--radius);
4-
padding:calc(var(--gutter) *4);
54
position: fixed;
65
bottom:1em;
76
left:1em;
87
width:calc(100%-2em);
9-
max-height:calc(60vh-2em);
8+
height:calc(70vh-2em);
109
overflow-y: scroll;
1110
z-index:3000;
12-
display: grid;
13-
/* grid-template-columns: repeat(1, minmax(1em, 1fr)); */
14-
grid-template-columns:repeat(auto-fill,minmax(12em,1fr));
1511
transform:translateY(calc(100%+2em));
1612
transition: transform var(--animation-speed-fast) ease-in-out;
17-
grid-gap:calc(var(--gutter) *8);
13+
/* display: grid;
14+
grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
15+
grid-gap: var(--line-width); */
1816
}
1917

2018
.is-menu-open .menu{
2119
transform:translateY(0);
2220
}
2321

24-
.menu-item{
25-
position: relative;
22+
.menu-nav:not(:last-child){
23+
margin:0;
24+
}
25+
26+
.menu-area{
27+
display: none;
28+
}
29+
30+
.menu-area.active{
31+
display: block;
32+
}
33+
34+
.menu-nav-button{
35+
margin:0;
36+
padding:1.5em2em;
37+
border-radius:0;
38+
}
39+
40+
.menu-nav-button.active{
41+
background-color:var(--gray-04);
42+
color:var(--white);
43+
}
44+
45+
.menu-content{
46+
padding:2em;
47+
}
48+
49+
.menu-sub-area{
50+
display: grid;
51+
grid-template-columns:repeat(auto-fill,minmax(14em,1fr));
52+
grid-gap:2em;
53+
}
54+
55+
.menu-header{
56+
border-top:var(--line-width) solid var(--gray-04);
57+
padding-top:1em;
2658
}
2759

28-
.menu-item:not(:first-child):before{
29-
/* content: ""
30-
border-left: 1px solid var(--gray-04);
31-
position: absolute;
32-
top: 0;
33-
left: -2em;
34-
width: calc(100% + 1px);
35-
height: calc(100% + 1px);
36-
pointer-events: none; */
60+
@media (min-width:550px){
61+
.menu{
62+
height:calc(70vh-2em);
63+
}
64+
65+
.menu-nav{
66+
display: flex;
67+
}
3768
}
3869

3970
@media (min-width:900px){
4071
.menu{
41-
max-height:calc(80vh-2em);
72+
height:calc(50vh-2em);
73+
}
74+
75+
.menu-nav{
76+
display: flex;
77+
}
78+
79+
.menu-sub-area{
80+
display: grid;
81+
grid-template-columns:repeat(auto-fill,minmax(20em,1fr));
4282
}
4383
}

0 commit comments

Comments
(0)