Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navbar hover bg variables are missing #41316

Open
3 tasks done
pinggi opened this issue Mar 24, 2025 · 1 comment
Open
3 tasks done

navbar hover bg variables are missing #41316

pinggi opened this issue Mar 24, 2025 · 1 comment

Comments

@pinggi
Copy link

pinggi commented Mar 24, 2025

Prerequisites

Describe the issue

Bootstrap theme defines navbar variables for text color on hover

$navbar-light-hover-color
$navbar-dark-hover-color

however not for the background color.

So it's not possible to set the background on hover by theme variables to achieve this effect

Image

Reduced test cases

  1. Go to bootstrap/scss/_variables.scss
  2. Find place where $navbar-light-hover-color is defined
  3. There's no variable for defining the background like
$navbar-light-hover-bg
$navbar-dark-hover-bg

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

5.3.0

@aapanchal
Copy link

Hi @pinggi and Bootstrap team,

I’d like to work on this issue by adding the missing $navbar-light-hover-bg and $navbar-dark-hover-bg variables.

Proposed Solution:

  • Add the variables in _variables.scss with default values:
    $navbar-light-hover-bg: rgba($black, 0.1) !default;
    $navbar-dark-hover-bg: rgba($white, 0.1) !default;
    

Does this approach sound good? If approved, I’ll submit a PR.

Thanks!
Aniket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants