Skip to content

Commit

Permalink
Improve use of CSS variables for navbar toggler
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Oct 11, 2023
1 parent e55df3f commit e49deec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/assets/bundle/trestle/bundle.css

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions frontend/css/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,27 @@
align-items: stretch;

.navbar-toggler {
--bs-navbar-toggler-bg: #{$sidebar-mobile-toggle-bg};
--bs-navbar-toggler-color: #{$sidebar-mobile-toggle-border-color};
--bs-navbar-toggler-border-color: #{$sidebar-mobile-toggle-border-color};

outline: none;

align-self: center;

margin-left: math.div($grid-gutter-width, 2);
margin-right: math.div($grid-gutter-width, 2);

background: $sidebar-mobile-toggle-bg;
border: $sidebar-mobile-toggle-border;
color: $sidebar-mobile-toggle-border-color;
background: var(--bs-navbar-toggler-bg);

&:hover, &:focus {
background: $sidebar-mobile-toggle-active-bg;
border: $sidebar-mobile-toggle-active-border;
color: $sidebar-mobile-toggle-active-border-color;
--bs-navbar-toggler-border-color: #{$sidebar-mobile-toggle-active-border-color};
--bs-navbar-toggler-bg: #{$sidebar-mobile-toggle-active-bg};
}
}

.navbar-toggler-icon {
background-image: $sidebar-mobile-toggle-icon-bg;
--bs-navbar-toggler-icon-bg: #{$sidebar-mobile-toggle-icon-bg};
}
}

Expand Down

0 comments on commit e49deec

Please sign in to comment.