@@ -38,7 +38,7 @@ Navbars come with built-in support for a handful of sub-components. Choose from
3838Here's an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the ` lg ` (large) breakpoint.
3939
4040{{< example >}}
41- <nav class =" navbar navbar-expand-lg bg-light " >
41+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
4242 <div class =" container-fluid " >
4343 <a class="navbar-brand" href="#">Navbar</a>
4444 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
@@ -64,7 +64,7 @@ Here's an example of all the sub-components included in a responsive light-theme
6464 </ul>
6565 </li>
6666 <li class="nav-item">
67- <a class="nav-link disabled">Disabled</a>
67+ <a class="nav-link disabled" aria-disabled="true" >Disabled</a>
6868 </li>
6969 </ul>
7070 <form class="d-flex" role="search">
@@ -76,7 +76,7 @@ Here's an example of all the sub-components included in a responsive light-theme
7676</nav >
7777{{< /example >}}
7878
79- This example uses [ background] ({{< docsref "/utilities/background" >}}) (` bg-light ` ) and [ spacing] ({{< docsref "/utilities/spacing" >}}) (` me-auto ` , ` mb-2 ` , ` mb-lg-0 ` , ` me-2 ` ) utility classes.
79+ This example uses [ background] ({{< docsref "/utilities/background" >}}) (` bg-body-tertiary" ` ) and [ spacing] ({{< docsref "/utilities/spacing" >}}) (` me-auto ` , ` mb-2 ` , ` mb-lg-0 ` , ` me-2 ` ) utility classes.
8080
8181### Brand
8282
@@ -88,14 +88,14 @@ Add your text within an element with the `.navbar-brand` class.
8888
8989{{< example >}}
9090<!-- As a link -->
91- <nav class =" navbar bg-light " >
91+ <nav class =" navbar bg-body-tertiary " >
9292 <div class =" container-fluid " >
9393 <a class="navbar-brand" href="#">Navbar</a>
9494 </div >
9595</nav >
9696
9797<!-- As a heading -->
98- <nav class =" navbar bg-light " >
98+ <nav class =" navbar bg-body-tertiary " >
9999 <div class =" container-fluid " >
100100 <span class="navbar-brand mb-0 h1">Navbar</span>
101101 </div >
@@ -107,7 +107,7 @@ Add your text within an element with the `.navbar-brand` class.
107107You can replace the text within the ` .navbar-brand ` with an ` <img> ` .
108108
109109{{< example >}}
110- <nav class =" navbar bg-light " >
110+ <nav class =" navbar bg-body-tertiary " >
111111 <div class =" container " >
112112 <a class="navbar-brand" href="#">
113113 <img src="/assets/brand/coreui-signet.svg" alt="" width="22" height="24">
@@ -121,7 +121,7 @@ You can replace the text within the `.navbar-brand` with an `<img>`.
121121You can also make use of some additional utilities to add an image and text at the same time. Note the addition of ` .d-inline-block ` and ` .align-text-top ` on the ` <img> ` .
122122
123123{{< example >}}
124- <nav class =" navbar bg-light " >
124+ <nav class =" navbar bg-body-tertiary " >
125125 <div class =" container-fluid " >
126126 <a class="navbar-brand" href="#">
127127 <img src="/assets/brand/coreui-signet.svg" alt="" width="22" height="24" class="d-inline-block align-top">
@@ -140,7 +140,7 @@ Add the `.active` class on `.nav-link` to indicate the current page.
140140Please note that you should also add the ` aria-current ` attribute on the active ` .nav-link ` .
141141
142142{{< example >}}
143- <nav class =" navbar navbar-expand-lg bg-light " >
143+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
144144 <div class =" container-fluid " >
145145 <a class="navbar-brand" href="#">Navbar</a>
146146 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@@ -158,7 +158,7 @@ Please note that you should also add the `aria-current` attribute on the active
158158 <a class="nav-link" href="#">Pricing</a>
159159 </li>
160160 <li class="nav-item">
161- <a class="nav-link disabled">Disabled</a>
161+ <a class="nav-link disabled" aria-disabled="true" >Disabled</a>
162162 </li>
163163 </ul>
164164 </div>
@@ -169,7 +169,7 @@ Please note that you should also add the `aria-current` attribute on the active
169169And because we use classes for our navs, you can avoid the list-based approach entirely if you like.
170170
171171{{< example >}}
172- <nav class =" navbar navbar-expand-lg bg-light " >
172+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
173173 <div class =" container-fluid " >
174174 <a class="navbar-brand" href="#">Navbar</a>
175175 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
@@ -180,7 +180,7 @@ And because we use classes for our navs, you can avoid the list-based approach e
180180 <a class="nav-link active" aria-current="page" href="#">Home</a>
181181 <a class="nav-link" href="#">Features</a>
182182 <a class="nav-link" href="#">Pricing</a>
183- <a class="nav-link disabled">Disabled</a>
183+ <a class="nav-link disabled" aria-disabled="true" >Disabled</a>
184184 </div>
185185 </div>
186186 </div >
@@ -190,7 +190,7 @@ And because we use classes for our navs, you can avoid the list-based approach e
190190You can also use dropdowns in your navbar. Dropdown menus require a wrapping element for positioning, so be sure to use separate and nested elements for ` .nav-item ` and ` .nav-link ` as shown below.
191191
192192{{< example >}}
193- <nav class =" navbar navbar-expand-lg bg-light " >
193+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
194194 <div class =" container-fluid " >
195195 <a class="navbar-brand" href="#">Navbar</a>
196196 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
@@ -228,7 +228,7 @@ You can also use dropdowns in your navbar. Dropdown menus require a wrapping ele
228228Place various form controls and components within a navbar:
229229
230230{{< example >}}
231- <nav class =" navbar bg-light " >
231+ <nav class =" navbar bg-body-tertiary " >
232232 <div class =" container-fluid " >
233233 <form class="d-flex" role="search">
234234 <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
@@ -241,7 +241,7 @@ Place various form controls and components within a navbar:
241241Immediate child elements of ` .navbar ` use flex layout and will default to ` justify-content: space-between ` . Use additional [ flex utilities] ({{< docsref "/utilities/flex" >}}) as needed to adjust this behavior.
242242
243243{{< example >}}
244- <nav class =" navbar bg-light " >
244+ <nav class =" navbar bg-body-tertiary " >
245245 <div class =" container-fluid " >
246246 <a class="navbar-brand">Navbar</a>
247247 <form class="d-flex" role="search">
@@ -255,7 +255,7 @@ Immediate child elements of `.navbar` use flex layout and will default to `justi
255255Input groups work, too. If your navbar is an entire form, or mostly a form, you can use the ` <form> ` element as the container and save some HTML.
256256
257257{{< example >}}
258- <nav class =" navbar bg-light " >
258+ <nav class =" navbar bg-body-tertiary " >
259259 <form class =" container-fluid " >
260260 <div class="input-group">
261261 <span class="input-group-text" id="basic-addon1">@</span>
@@ -268,7 +268,7 @@ Input groups work, too. If your navbar is an entire form, or mostly a form, you
268268Various buttons are supported as part of these navbar forms, too. This is also a great reminder that vertical alignment utilities can be used to align different sized elements.
269269
270270{{< example >}}
271- <nav class =" navbar bg-light " >
271+ <nav class =" navbar bg-body-tertiary " >
272272 <form class =" container-fluid justify-content-start " >
273273 <button class="btn btn-outline-success me-2" type="button">Main button</button>
274274 <button class="btn btn-sm btn-outline-secondary" type="button">Smaller button</button>
@@ -281,7 +281,7 @@ Various buttons are supported as part of these navbar forms, too. This is also a
281281Navbars may contain bits of text with the help of ` .navbar-text ` . This class adjusts vertical alignment and horizontal spacing for strings of text.
282282
283283{{< example >}}
284- <nav class =" navbar bg-light " >
284+ <nav class =" navbar bg-body-tertiary " >
285285 <div class =" container-fluid " >
286286 <span class="navbar-text">
287287 Navbar text with an inline element
@@ -293,7 +293,7 @@ Navbars may contain bits of text with the help of `.navbar-text`. This class adj
293293Mix and match with other components and utilities as needed.
294294
295295{{< example >}}
296- <nav class =" navbar navbar-expand-lg bg-light " >
296+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
297297 <div class =" container-fluid " >
298298 <a class="navbar-brand" href="#">Navbar w/ text</a>
299299 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
@@ -436,7 +436,7 @@ Although it's not required, you can wrap a navbar in a `.container` to center it
436436
437437{{< example >}}
438438<div class =" container " >
439- <nav class =" navbar navbar-expand-lg bg-light " >
439+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
440440 <div class="container-fluid">
441441 <a class="navbar-brand" href="#">Navbar</a>
442442 </div>
@@ -447,7 +447,7 @@ Although it's not required, you can wrap a navbar in a `.container` to center it
447447Use any of the responsive containers to change how wide the content in your navbar is presented.
448448
449449{{< example >}}
450- <nav class =" navbar navbar-expand-lg bg-light " >
450+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
451451 <div class =" container-md " >
452452 <a class="navbar-brand" href="#">Navbar</a>
453453 </div >
@@ -461,39 +461,39 @@ Use our [position utilities]({{< docsref "/utilities/position" >}}) to place nav
461461Fixed navbars use ` position: fixed ` , meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., ` padding-top ` on the ` <body> ` ) to prevent overlap with other elements.
462462
463463{{< example >}}
464- <nav class =" navbar bg-light " >
464+ <nav class =" navbar bg-body-tertiary " >
465465 <div class =" container-fluid " >
466466 <a class="navbar-brand" href="#">Default</a>
467467 </div >
468468</nav >
469469{{< /example >}}
470470
471471{{< example >}}
472- <nav class =" navbar fixed-top bg-light " >
472+ <nav class =" navbar fixed-top bg-body-tertiary " >
473473 <div class =" container-fluid " >
474474 <a class="navbar-brand" href="#">Fixed top</a>
475475 </div >
476476</nav >
477477{{< /example >}}
478478
479479{{< example >}}
480- <nav class =" navbar fixed-bottom bg-light " >
480+ <nav class =" navbar fixed-bottom bg-body-tertiary " >
481481 <div class =" container-fluid " >
482482 <a class="navbar-brand" href="#">Fixed bottom</a>
483483 </div >
484484</nav >
485485{{< /example >}}
486486
487487{{< example >}}
488- <nav class =" navbar sticky-top bg-light " >
488+ <nav class =" navbar sticky-top bg-body-tertiary " >
489489 <div class =" container-fluid " >
490490 <a class="navbar-brand" href="#">Sticky top</a>
491491 </div >
492492</nav >
493493{{< /example >}}
494494
495495{{< example >}}
496- <nav class =" navbar sticky-bottom bg-light " >
496+ <nav class =" navbar sticky-bottom bg-body-tertiary " >
497497 <div class =" container-fluid " >
498498 <a class="navbar-brand" href="#">Sticky bottom</a>
499499 </div >
@@ -509,7 +509,7 @@ Please note that this behavior comes with a potential drawback of `overflow`—w
509509Here's an example navbar using ` .navbar-nav-scroll ` with ` style="scroll-height: 100px;" ` , with some extra margin utilities for optimum spacing.
510510
511511{{< example >}}
512- <nav class =" navbar navbar-expand-lg bg-light " >
512+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
513513 <div class =" container-fluid " >
514514 <a class="navbar-brand" href="#">Navbar scroll</a>
515515 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarScroll" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
@@ -535,7 +535,7 @@ Here's an example navbar using `.navbar-nav-scroll` with `style="scroll-height:
535535 </ul>
536536 </li>
537537 <li class="nav-item">
538- <a class="nav-link disabled">Link</a>
538+ <a class="nav-link disabled" aria-disabled="true" >Link</a>
539539 </li>
540540 </ul>
541541 <form class="d-flex" role="search">
@@ -560,7 +560,7 @@ Navbar togglers are left-aligned by default, but should they follow a sibling el
560560With no ` .navbar-brand ` shown at the smallest breakpoint:
561561
562562{{< example >}}
563- <nav class =" navbar navbar-expand-lg bg-light " >
563+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
564564 <div class =" container-fluid " >
565565 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
566566 <span class="navbar-toggler-icon"></span>
@@ -575,7 +575,7 @@ With no `.navbar-brand` shown at the smallest breakpoint:
575575 <a class="nav-link" href="#">Link</a>
576576 </li>
577577 <li class="nav-item">
578- <a class="nav-link disabled">Disabled</a>
578+ <a class="nav-link disabled" aria-disabled="true" >Disabled</a>
579579 </li>
580580 </ul>
581581 <form class="d-flex" role="search">
@@ -590,7 +590,7 @@ With no `.navbar-brand` shown at the smallest breakpoint:
590590With a brand name shown on the left and toggler on the right:
591591
592592{{< example >}}
593- <nav class =" navbar navbar-expand-lg bg-light " >
593+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
594594 <div class =" container-fluid " >
595595 <a class="navbar-brand" href="#">Navbar</a>
596596 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
@@ -605,7 +605,7 @@ With a brand name shown on the left and toggler on the right:
605605 <a class="nav-link" href="#">Link</a>
606606 </li>
607607 <li class="nav-item">
608- <a class="nav-link disabled">Disabled</a>
608+ <a class="nav-link disabled" aria-disabled="true" >Disabled</a>
609609 </li>
610610 </ul>
611611 <form class="d-flex" role="search">
@@ -620,7 +620,7 @@ With a brand name shown on the left and toggler on the right:
620620With a toggler on the left and brand name on the right:
621621
622622{{< example >}}
623- <nav class =" navbar navbar-expand-lg bg-light " >
623+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " >
624624 <div class =" container-fluid " >
625625 <button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
626626 <span class="navbar-toggler-icon"></span>
@@ -635,7 +635,7 @@ With a toggler on the left and brand name on the right:
635635 <a class="nav-link" href="#">Link</a>
636636 </li>
637637 <li class="nav-item">
638- <a class="nav-link disabled">Disabled</a>
638+ <a class="nav-link disabled" aria-disabled="true" >Disabled</a>
639639 </li>
640640 </ul>
641641 <form class="d-flex" role="search">
@@ -655,7 +655,7 @@ Sometimes you want to use the collapse plugin to trigger a container element for
655655<div class =" collapse " id =" navbarToggleExternalContent " >
656656 <div class =" bg-dark p-4 " >
657657 <h5 class="text-white h4">Collapsed content</h5>
658- <span class="text-muted ">Toggleable via the navbar brand.</span>
658+ <span class="text-body-secondary ">Toggleable via the navbar brand.</span>
659659 </div >
660660</div >
661661<nav class =" navbar navbar-dark bg-dark " >
@@ -676,7 +676,7 @@ Transform your expanding and collapsing navbar into an offcanvas drawer with the
676676In the example below, to create an offcanvas navbar that is always collapsed across all breakpoints, omit the ` .navbar-expand-* ` class entirely.
677677
678678{{< example >}}
679- <nav class =" navbar bg-light fixed-top " >
679+ <nav class =" navbar bg-body-tertiary " fixed-top" >
680680 <div class =" container-fluid " >
681681 <a class="navbar-brand" href="#">Offcanvas navbar</a>
682682 <button class="navbar-toggler" type="button" data-coreui-toggle="offcanvas" data-coreui-target="#offcanvasNavbar" aria-controls="offcanvasNavbar">
@@ -722,7 +722,7 @@ In the example below, to create an offcanvas navbar that is always collapsed acr
722722To create an offcanvas navbar that expands into a normal navbar at a specific breakpoint like ` lg ` , use ` .navbar-expand-lg ` .
723723
724724``` html
725- <nav class =" navbar navbar-expand-lg bg-light fixed-top" >
725+ <nav class =" navbar navbar-expand-lg bg-body-tertiary " fixed-top " >
726726 <a class=" navbar-brand " href=" # " >Offcanvas navbar</a>
727727 <button class=" navbar-toggler " type=" button " data-coreui-toggle=" offcanvas " data-coreui-target=" #navbarOffcanvasLg " aria-controls=" navbarOffcanvasLg " >
728728 <span class=" navbar-toggler-icon " ></span>
@@ -739,13 +739,13 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
739739<nav class=" navbar navbar-dark bg-dark fixed-top " >
740740 <div class=" container-fluid " >
741741 <a class=" navbar-brand " href=" # " >Offcanvas dark navbar</a>
742- <button class="navbar-toggler" type="button" data-cui -toggle="offcanvas" data-cui -target="#offcanvasDarkNavbar" aria-controls="offcanvasDarkNavbar">
742+ <button class=" navbar-toggler " type=" button " data-coreui -toggle=" offcanvas " data-coreui -target=" #offcanvasDarkNavbar " aria-controls=" offcanvasDarkNavbar " >
743743 <span class=" navbar-toggler-icon " ></span>
744744 </button>
745745 <div class=" offcanvas offcanvas-end text-bg-dark " tabindex=" -1 " id=" offcanvasDarkNavbar " aria-labelledby=" offcanvasDarkNavbarLabel " >
746746 <div class=" offcanvas-header " >
747747 <h5 class=" offcanvas-title " id=" offcanvasDarkNavbarLabel " >Dark offcanvas</h5>
748- <button type="button" class="btn-close btn-close-white" data-cui -dismiss="offcanvas" aria-label="Close"></button>
748+ <button type=" button " class=" btn-close btn-close-white " data-coreui -dismiss=" offcanvas " aria-label=" Close " ></button>
749749 </div>
750750 <div class=" offcanvas-body " >
751751 <ul class=" navbar-nav justify-content-end flex-grow-1 pe-3 " >
@@ -756,7 +756,7 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
756756 <a class=" nav-link " href=" # " >Link</a>
757757 </li>
758758 <li class=" nav-item dropdown " >
759- <a class="nav-link dropdown-toggle" href="#" role="button" data-cui -toggle="dropdown" aria-expanded="false">
759+ <a class=" nav-link dropdown-toggle " href=" # " role=" button " data-coreui -toggle=" dropdown " aria-expanded=" false " >
760760 Dropdown
761761 </a>
762762 <ul class=" dropdown-menu dropdown-menu-dark " >
@@ -781,7 +781,7 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
781781
782782## Customizing
783783
784- ### CSS Variables
784+ ### CSS variables
785785
786786Navbars use local CSS variables on `.navbar` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.
787787
@@ -793,13 +793,17 @@ Some additional CSS variables are also present on `.navbar-nav`:
793793
794794### SASS variables
795795
796+ Variables for all navbars:
797+
796798{{< scss-docs name=" navbar-variables " file=" scss /_variables.scss " >}}
797799
798- {{< scss-docs name="navbar-theme-variables" file="scss/_ variables.scss" >}}
800+ Variables for the [dark navbar](#color-schemes):
801+
802+ {{< scss-docs name=" navbar-dark-variables " file=" scss /_variables.scss " >}}
799803
800804### SASS loop
801805
802806[Responsive navbar expand/collapse classes](#responsive-behaviors) (e.g., `.navbar-expand-lg`) are combined with the `$breakpoints` map and generated through a loop in `scss/_navbar.scss`.
803807
804808{{< scss-docs name=" navbar-expand-loop " file=" scss /_navbar.scss " >}}
805-
809+ s
0 commit comments