Skip to content

Commit 603eede

Browse files
committed
feat: reduce the size of the nav menu
1 parent 666ab9a commit 603eede

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

packages/keybr-pages-browser/lib/NavMenu.module.less

+9-20
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
.root {
44
position: sticky;
55
inset-block-start: 0;
6-
max-inline-size: 12rem;
7-
margin: 0;
8-
padding: 0;
6+
max-inline-size: 10rem;
97
box-shadow: var(--Surface__box-shadow);
108
backdrop-filter: var(--Surface__backdrop-filter);
119
}
@@ -18,27 +16,23 @@
1816
display: flex;
1917
align-items: center;
2018
justify-content: flex-start;
21-
block-size: 3rem;
22-
margin: 0;
19+
block-size: 2rem;
2320
padding-inline: 1rem;
2421
padding-block: 0;
2522
color: var(--text-color);
26-
line-height: 3rem;
23+
line-height: 2rem;
2724
text-decoration: none;
2825

29-
&:hover {
30-
color: var(--text-color);
31-
background-color: var(--background-color);
32-
}
33-
3426
&.isActive {
3527
color: var(--text-color);
36-
background-color: var(--background-color);
28+
background-color: var(--primary-l1);
3729
}
3830
}
3931

4032
.icon {
41-
display: inline-block;
33+
inline-size: 1rem;
34+
block-size: 1rem;
35+
fill: var(--secondary-f1);
4236
}
4337

4438
.label {
@@ -57,19 +51,14 @@
5751
color: var(--text-color);
5852
text-decoration: none;
5953

60-
&:hover {
61-
color: var(--text-color);
62-
background-color: var(--background-color);
63-
}
64-
6554
&.isActive {
6655
color: var(--text-color);
67-
background-color: var(--background-color);
56+
background-color: var(--primary-l1);
6857
}
6958
}
7059

7160
.userName {
7261
.text-truncate();
73-
max-inline-size: 10rem;
62+
max-inline-size: 8rem;
7463
text-align: center;
7564
}

packages/keybr-pages-browser/lib/NavMenu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function MenuItemLink({
115115
to={path}
116116
title={title && formatMessage(title)}
117117
>
118-
<Icon shape={icon ?? ""} />
118+
<Icon className={styles.icon} shape={icon ?? ""} />
119119
<span className={styles.label}>{formatMessage(label)}</span>
120120
</NavLink>
121121
);

packages/keybr-pages-browser/lib/SubMenu.module.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
margin: 0;
77
padding-inline: 0;
88
padding-block: 1rem;
9-
font-size: 0.8rem;
9+
font-size: 0.75rem;
1010
text-align: center;
1111
}
1212

0 commit comments

Comments
 (0)