Skip to content

Commit

Permalink
Fix inconsistency in sidebar title padding between breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Aug 14, 2024
1 parent d18c9e9 commit b6cca1c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/assets/bundle/trestle/admin.css

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions frontend/css/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
.app-wrapper {
--sidebar-width: #{$sidebar-width};
--sidebar-width-collapsed: #{$sidebar-width-collapsed};
--sidebar-padding: #{$sidebar-padding};
--sidebar-padding-collapsed: #{$sidebar-padding-collapsed};
--sidebar-transition-duration: #{$sidebar-transition-duration};
--sidebar-transition-timing: ease-out;
--sidebar-bg: #{$sidebar-bg};
Expand Down Expand Up @@ -69,7 +71,7 @@
display: flex;
align-items: center;

padding: 0.5rem 0.875rem;
padding: var(--sidebar-padding);

font-size: 1.25rem;
font-weight: 500;
Expand Down Expand Up @@ -176,7 +178,7 @@

.app-sidebar-title {
justify-content: center;
padding: 0.5rem 0.25rem;
padding: var(--sidebar-padding-collapsed);

// Match right margin with navbar toggler width:
// (margin + border + font-size * icon-width + padding)
Expand All @@ -200,7 +202,7 @@
width: var(--sidebar-width-collapsed);
flex-basis: var(--sidebar-width-collapsed);

padding: 0.5rem 0.25rem;
padding: var(--sidebar-padding-collapsed);
justify-content: center;

img {
Expand Down Expand Up @@ -231,7 +233,7 @@
width: var(--sidebar-width);
flex-basis: var(--sidebar-width);

padding: 0.5rem 0.25rem;
padding: var(--sidebar-padding);
justify-content: flex-start;

img {
Expand Down Expand Up @@ -267,7 +269,7 @@
width: var(--sidebar-width-collapsed);
flex-basis: var(--sidebar-width-collapsed);

padding: 0.5rem 0.25rem;
padding: var(--sidebar-padding-collapsed);
justify-content: center;

img {
Expand Down
3 changes: 3 additions & 0 deletions frontend/css/variables/_trestle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ $sidebar-mobile-toggle-active-border: $sidebar-mobile-toggle-border-width
$sidebar-width: 15.625rem;
$sidebar-width-collapsed: 3.5rem;

$sidebar-padding: 0.5rem 0.875rem;
$sidebar-padding-collapsed: 0.5rem 0.25rem;

$sidebar-transition-duration: 200ms;


Expand Down

0 comments on commit b6cca1c

Please sign in to comment.