Skip to content

Commit 6d90bf6

Browse files
committed
frontend: style sidebar to be responsive
Sidebar does not need to grow, as it works well if the font size is renderd at 200%. Changing back to px.
1 parent b1b36ce commit 6d90bf6

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

frontends/web/src/components/sidebar/sidebar.module.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@
113113
cursor: default;
114114
display: flex;
115115
flex-direction: row;
116-
height: var(--sidebar-item-height);
116+
min-height: var(--sidebar-item-height);
117117
justify-content: center;
118-
overflow: hidden;
119118
position: relative;
120119
text-decoration: none;
121120
}
@@ -166,6 +165,7 @@ a.sidebarActive :global(.stacked) img:last-child,
166165
.single img {
167166
opacity: .6;
168167
transition: opacity 0.2s ease;
168+
vertical-align: top;
169169
}
170170

171171
a.sidebarActive .single img,
@@ -179,10 +179,10 @@ a.sidebarActive .single img,
179179
line-height: 1;
180180
flex: 1;
181181
padding-top: 0;
182-
padding-right: var(--space-default);
182+
padding-right: 16px;
183183
font-size: var(--size-default);
184184
font-weight: 400;
185-
transition: all 0.2s ease;
185+
/* transition: all 0.2s ease; /* TODO: why all, what is this even supposed to be transitioning */
186186
word-break: break-word;
187187
}
188188

frontends/web/src/style/layout.css

+1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@
358358

359359
.stacked img {
360360
transition: opacity 0.2s ease;
361+
vertical-align: top;
361362
}
362363

363364
.stacked img:last-child {

frontends/web/src/style/variables.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474

7575
/* sidebar */
7676
--sidebar-width-large: 250px;
77-
--sidebar-margin: 3.2rem;
78-
--sidebar-item-height: 5.2rem;
79-
--sidebar-icon-margin: 1.4rem;
80-
--sidebar-icon-size: 2.4rem;
77+
--sidebar-margin: 32px;
78+
--sidebar-item-height: 52px;
79+
--sidebar-icon-margin: 14px;
80+
--sidebar-icon-size: 24px;
8181
--sidebar-header-size: 1.2rem;
8282
--sidebar-header-line-height: 1.6rem;
8383

0 commit comments

Comments
 (0)