Skip to content

Commit 4772831

Browse files
committed
feat(.navigation-top.css): add desktop styles
* Tweak mobile styles for smooth layout transition
1 parent 17280d4 commit 4772831

File tree

1 file changed

+42
-25
lines changed

1 file changed

+42
-25
lines changed

src/css/layout/navigation-top.css

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414
.navigation__logo {
1515
box-shadow: none;
16+
display: flex;
1617
grid-area: logo;
18+
max-width: fit-content;
1719

1820
img {
1921
height: 75px;
@@ -47,11 +49,22 @@
4749

4850
.navigation__list {
4951
background-color: white;
52+
border-color: rgba(0, 0, 0, 0.1);
53+
border-radius: 0 0 8px 8px;
54+
border-style: solid;
55+
border-width: 0 1px 1px 1px;
56+
box-shadow: 0px 10px 30px 0 rgba(0, 0, 0, 0.04);
5057
display: none;
5158
flex-direction: column;
5259
gap: 20px;
60+
left: 25%;
5361
list-style: none;
62+
margin: 0;
63+
min-width: 275px;
5464
padding: 16px 30px;
65+
position: absolute;
66+
top: 61.5px;
67+
transform: translateX(-50%);
5568
z-index: 1;
5669
}
5770

@@ -60,20 +73,7 @@
6073
}
6174

6275
.navigation__list--mobile-opened {
63-
background-color: white;
64-
border-color: rgba(0, 0, 0, 0.1);
65-
border-radius: 0 0 8px 8px;
66-
border-style: solid;
67-
border-width: 0 1px 1px 1px;
68-
box-shadow: 0px 10px 30px 0 rgba(0, 0, 0, 0.04);
6976
display: flex;
70-
flex-direction: column;
71-
left: 25%;
72-
margin-top: 0;
73-
min-width: 275px;
74-
position: absolute;
75-
top: 65px;
76-
transform: translateX(-50%);
7777
}
7878

7979
.navigation__list--mobile-opened::before {
@@ -104,16 +104,6 @@
104104
}
105105
}
106106

107-
.navigation__item.current {
108-
a {
109-
background-color: var(--color-yellow);
110-
}
111-
112-
a:hover {
113-
background-color: var(--color-lightblue);
114-
}
115-
}
116-
117107
.navigation__membership {
118108
grid-area: membership;
119109
}
@@ -123,8 +113,35 @@
123113
display: none;
124114
}
125115

126-
.navigation__list--mobile-closed,
127-
.navigation__list--mobile-opened {
116+
.navigation__inner {
117+
grid-template-columns: max-content 1fr max-content;
118+
padding: 0;
119+
}
120+
121+
.navigation__logo {
122+
margin-left: -8px;
123+
}
124+
125+
.navigation__mobile-menu-trigger {
126+
display: none;
127+
}
128+
129+
.navigation__list {
130+
border: none;
131+
box-shadow: none;
132+
display: flex;
133+
flex-direction: row;
134+
gap: 0;
135+
justify-self: center;
136+
left: auto;
137+
min-width: unset;
138+
padding: 0;
139+
position: relative;
140+
top: auto;
141+
transform: unset;
142+
}
143+
144+
.navigation__list::before {
128145
display: none;
129146
}
130147
}

0 commit comments

Comments
 (0)