Skip to content

Commit

Permalink
frontend: style sidebar to be responsive
Browse files Browse the repository at this point in the history
Sidebar does not need to grow, as it works well if the font size
is renderd at 200%. Changing back to px.
  • Loading branch information
thisconnect committed May 9, 2024
1 parent b1b36ce commit 6d90bf6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions frontends/web/src/components/sidebar/sidebar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@
cursor: default;
display: flex;
flex-direction: row;
height: var(--sidebar-item-height);
min-height: var(--sidebar-item-height);
justify-content: center;
overflow: hidden;
position: relative;
text-decoration: none;
}
Expand Down Expand Up @@ -166,6 +165,7 @@ a.sidebarActive :global(.stacked) img:last-child,
.single img {
opacity: .6;
transition: opacity 0.2s ease;
vertical-align: top;
}

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

Expand Down
1 change: 1 addition & 0 deletions frontends/web/src/style/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@

.stacked img {
transition: opacity 0.2s ease;
vertical-align: top;
}

.stacked img:last-child {
Expand Down
8 changes: 4 additions & 4 deletions frontends/web/src/style/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@

/* sidebar */
--sidebar-width-large: 250px;
--sidebar-margin: 3.2rem;
--sidebar-item-height: 5.2rem;
--sidebar-icon-margin: 1.4rem;
--sidebar-icon-size: 2.4rem;
--sidebar-margin: 32px;
--sidebar-item-height: 52px;
--sidebar-icon-margin: 14px;
--sidebar-icon-size: 24px;
--sidebar-header-size: 1.2rem;
--sidebar-header-line-height: 1.6rem;

Expand Down

0 comments on commit 6d90bf6

Please sign in to comment.