From ac50e18800373a1521487293d1c065b99bb06925 Mon Sep 17 00:00:00 2001 From: Alex Schmitt Date: Tue, 19 Apr 2022 13:46:30 -0700 Subject: [PATCH] Update side navigation active / hover contexts This aligns closer to RailsAdmin 2.x.x, where the background of an element in the side nav changes when it's either active or hovered over - making the navigation itself easier to follow in the UI --- src/rails_admin/styles/base/theming.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/rails_admin/styles/base/theming.scss b/src/rails_admin/styles/base/theming.scss index 8092532c66..66582d756d 100644 --- a/src/rails_admin/styles/base/theming.scss +++ b/src/rails_admin/styles/base/theming.scss @@ -42,6 +42,16 @@ body.rails_admin { > li > a { padding: ($navbar-padding-y / 2) ($grid-gutter-width / 2); + &.active { + background-color: map-get($theme-colors, primary); + color: color-contrast(map-get($theme-colors, primary)); + } + + &:hover { + background-color: map-get($theme-colors, primary); + color: color-contrast(map-get($theme-colors, primary)); + } + &.nav-level-1 { padding-left: $grid-gutter-width; }