Skip to content

Commit 23222b6

Browse files
committed
Edit nav menus style
1 parent 582677a commit 23222b6

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

src/components/Nav/index.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const Nav = () => {
4848
))}
4949
</SubMenus>
5050
)}
51+
<span className="separator" />
5152
</Menu>
5253
))}
5354
</div>
@@ -68,7 +69,7 @@ const Container = styled.div`
6869
const SubMenus = styled.div`
6970
display: none;
7071
position: absolute;
71-
top: 1.5rem;
72+
top: 90%;
7273
7374
background-color: #141414;
7475
@@ -101,20 +102,6 @@ const Menu = styled.div`
101102
cursor: pointer;
102103
user-select: none;
103104
104-
@media only screen and (min-width: 810px) {
105-
padding: 0 0.5rem;
106-
height: 1rem;
107-
& + & {
108-
border-left: 1px solid;
109-
}
110-
&:first-of-type {
111-
padding-left: 0;
112-
}
113-
&:last-of-type {
114-
padding-right: 0;
115-
}
116-
}
117-
118105
&:hover {
119106
color: #b0a8fe;
120107
& > ${SubMenus} {

src/components/common/Page/style.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ body {
195195
}
196196
}
197197
}
198+
& > span.separator {
199+
display: none;
200+
height: 1rem;
201+
border-left: 1px solid;
202+
margin: 0 0.5rem;
203+
}
198204
}
199205
}
200206

@@ -410,15 +416,32 @@ body {
410416

411417
& > .menu-item {
412418
border: none;
419+
flex-direction: row;
413420

414421
& > span {
415422
border-bottom: none;
423+
width: unset;
424+
}
425+
426+
& > span.separator {
427+
display: block;
428+
}
429+
430+
&:last-of-type > span.separator {
431+
display: none;
416432
}
417433

418434
&:hover {
419435
& > .sub-menu {
420436
position: absolute;
421437
width: max-content;
438+
transform: translateX(-0.5rem);
439+
}
440+
}
441+
442+
&:last-of-type:hover {
443+
& > .sub-menu {
444+
transform: none;
422445
}
423446
}
424447

0 commit comments

Comments
 (0)