mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Fix for missing CSS variables on .navbar-nav
(#36105)
* Fix for missing CSS variables on .navbar-nav * Document new CSS vars on .navbar-nav
This commit is contained in:
parent
a7153567e1
commit
0323fe99d2
@ -84,27 +84,20 @@
|
||||
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
|
||||
|
||||
.navbar-nav {
|
||||
// scss-docs-start navbar-nav-css-vars
|
||||
--#{$prefix}nav-link-padding-x: 0;
|
||||
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
|
||||
--#{$prefix}nav-link-color: var(--#{$prefix}navbar-color);
|
||||
--#{$prefix}nav-link-hover-color: var(--#{$prefix}navbar-hover-color);
|
||||
--#{$prefix}nav-link-disabled-color: var(--#{$prefix}navbar-disabled-color);
|
||||
// scss-docs-end navbar-nav-css-vars
|
||||
|
||||
display: flex;
|
||||
flex-direction: column; // cannot use `inherit` to get the `.navbar`s value
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
|
||||
.nav-link {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
color: var(--#{$prefix}navbar-color);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: var(--#{$prefix}navbar-hover-color);
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: var(--#{$prefix}navbar-disabled-color);
|
||||
}
|
||||
}
|
||||
|
||||
.show > .nav-link,
|
||||
.nav-link.active {
|
||||
color: var(--#{$prefix}navbar-active-color);
|
||||
|
@ -742,6 +742,10 @@ As part of Bootstrap's evolving CSS variables approach, navbars now use local CS
|
||||
|
||||
{{< scss-docs name="navbar-css-vars" file="scss/_navbar.scss" >}}
|
||||
|
||||
Some additional CSS variables are also present on `.navbar-nav`:
|
||||
|
||||
{{< scss-docs name="navbar-nav-css-vars" file="scss/_navbar.scss" >}}
|
||||
|
||||
### Sass variables
|
||||
|
||||
{{< scss-docs name="navbar-variables" file="scss/_variables.scss" >}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user