Skip to content

Commit 0a24b5f

Browse files
committed
docs: update content
1 parent 182c7de commit 0a24b5f

19 files changed

+69
-80
lines changed

docs/content/components/avatar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,6 @@ Fancy larger or smaller avatar? Add .avatar-lg or .avatar-sm for additional size
116116

117117
## Customizing
118118

119-
### SASS Variables
119+
### SASS variables
120120

121121
{{< scss-docs name="avatar-variables" file="scss/_variables.scss" >}}

docs/content/components/carousel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ myCarousel.addEventListener('slide.coreui.carousel', event => {
381381
```
382382
## Customizing
383383

384-
### SASS Variables
384+
### SASS variables
385385

386386
Variables for all carousels:
387387

docs/content/components/close-button.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,25 @@ Disabled close buttons change their `opacity`. We've also applied `pointer-event
2323
<button type="button" class="btn-close" disabled aria-label="Close"></button>
2424
{{< /example >}}
2525

26-
## White variant
26+
## Dark variant
2727

28-
Change the default `.btn-close` to be white with the `.btn-close-white` class. This class uses the `filter` property to invert the `background-image`.
28+
{{< deprecated-in "5.0.0" >}}
29+
30+
{{< callout warning >}}
31+
**Heads up!** As of v5.0.0, the `.btn-close-white` class is deprecated. Instead, use `data-coreui-theme="dark"` to change the color mode of the close button.
32+
{{< /callout >}}
33+
34+
Add `data-coreui-theme="dark"` to the `.btn-close`, or to its parent element, to invert the close button. This uses the `filter` property to invert the `background-image` without overriding its value.
2935

3036
{{< example class="bg-dark" >}}
31-
<button type="button" class="btn-close btn-close-white" aria-label="Close"></button>
32-
<button type="button" class="btn-close btn-close-white" disabled aria-label="Close"></button>
37+
<div data-coreui-theme="dark">
38+
<button type="button" class="btn-close" aria-label="Close"></button>
39+
<button type="button" class="btn-close" disabled aria-label="Close"></button>
40+
</div>
3341
{{< /example >}}
3442

3543
## Customizing
3644

37-
### SASS Variables
45+
### SASS variables
3846

3947
{{< scss-docs name="close-variables" file="scss/_variables.scss" >}}
40-
41-
### CSS variables
42-
{{< css-vars-docs file="scss/_close.scss" >}}

docs/content/components/list-group.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ If no tab was already active, the `hide.coreui.tab` and `hidden.coreui.tab` even
464464
{{< /bs-table >}}
465465

466466
```js
467-
const tabElms = document.querySelectorAll('a[data-cui-toggle="list"]')
467+
const tabElms = document.querySelectorAll('a[data-coreui-toggle="list"]')
468468
tabElms.forEach(tabElm => {
469469
tabElm.addEventListener('shown.coreui.tab', event => {
470470
event.target // newly activated tab

docs/content/components/navbar.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Navbars come with built-in support for a handful of sub-components. Choose from
3838
Here'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-body-tertiary"">
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">
@@ -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-body-tertiary"">
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-body-tertiary"">
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.
107107
You can replace the text within the `.navbar-brand` with an `<img>`.
108108

109109
{{< example >}}
110-
<nav class="navbar bg-body-tertiary"">
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>`.
121121
You 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-body-tertiary"">
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.
140140
Please 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-body-tertiary"">
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">
@@ -169,7 +169,7 @@ Please note that you should also add the `aria-current` attribute on the active
169169
And 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-body-tertiary"">
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">
@@ -190,7 +190,7 @@ And because we use classes for our navs, you can avoid the list-based approach e
190190
You 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-body-tertiary"">
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
228228
Place various form controls and components within a navbar:
229229

230230
{{< example >}}
231-
<nav class="navbar bg-body-tertiary"">
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:
241241
Immediate 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-body-tertiary"">
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
255255
Input 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-body-tertiary"">
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
268268
Various 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-body-tertiary"">
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
281281
Navbars 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-body-tertiary"">
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
293293
Mix and match with other components and utilities as needed.
294294

295295
{{< example >}}
296-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
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">
@@ -326,7 +326,7 @@ Mix and match with other components and utilities as needed.
326326

327327
---
328328

329-
**New in v5.0.0** Navbar theming is now powered by CSS variables and `.navbar-light` has been deprecated. CSS variables are applied to `.navbar`, defaulting to the "light" appearance, and can be overridden with `.navbar-dark`.
329+
**New in v4.2.6** Navbar theming is now powered by CSS variables and `.navbar-light` has been deprecated. CSS variables are applied to `.navbar`, defaulting to the "light" appearance, and can be overridden with `.navbar-dark`.
330330
{{< /callout >}}
331331

332332
Navbar themes are easier than ever thanks to CoreUI for Bootstrap's combination of Sass and CSS variables. The default is our "light navbar" for use with light background colors, but you can also apply `data-coreui-theme="dark"` for dark background colors. Then, customize with `.bg-*` utilities.
@@ -440,7 +440,7 @@ Although it's not required, you can wrap a navbar in a `.container` to center it
440440

441441
{{< example >}}
442442
<div class="container">
443-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
443+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
444444
<div class="container-fluid">
445445
<a class="navbar-brand" href="#">Navbar</a>
446446
</div>
@@ -451,7 +451,7 @@ Although it's not required, you can wrap a navbar in a `.container` to center it
451451
Use any of the responsive containers to change how wide the content in your navbar is presented.
452452

453453
{{< example >}}
454-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
454+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
455455
<div class="container-md">
456456
<a class="navbar-brand" href="#">Navbar</a>
457457
</div>
@@ -465,39 +465,39 @@ Use our [position utilities]({{< docsref "/utilities/position" >}}) to place nav
465465
Fixed 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.
466466

467467
{{< example >}}
468-
<nav class="navbar bg-body-tertiary"">
468+
<nav class="navbar bg-body-tertiary">
469469
<div class="container-fluid">
470470
<a class="navbar-brand" href="#">Default</a>
471471
</div>
472472
</nav>
473473
{{< /example >}}
474474

475475
{{< example >}}
476-
<nav class="navbar fixed-top bg-body-tertiary"">
476+
<nav class="navbar fixed-top bg-body-tertiary">
477477
<div class="container-fluid">
478478
<a class="navbar-brand" href="#">Fixed top</a>
479479
</div>
480480
</nav>
481481
{{< /example >}}
482482

483483
{{< example >}}
484-
<nav class="navbar fixed-bottom bg-body-tertiary"">
484+
<nav class="navbar fixed-bottom bg-body-tertiary">
485485
<div class="container-fluid">
486486
<a class="navbar-brand" href="#">Fixed bottom</a>
487487
</div>
488488
</nav>
489489
{{< /example >}}
490490

491491
{{< example >}}
492-
<nav class="navbar sticky-top bg-body-tertiary"">
492+
<nav class="navbar sticky-top bg-body-tertiary">
493493
<div class="container-fluid">
494494
<a class="navbar-brand" href="#">Sticky top</a>
495495
</div>
496496
</nav>
497497
{{< /example >}}
498498

499499
{{< example >}}
500-
<nav class="navbar sticky-bottom bg-body-tertiary"">
500+
<nav class="navbar sticky-bottom bg-body-tertiary">
501501
<div class="container-fluid">
502502
<a class="navbar-brand" href="#">Sticky bottom</a>
503503
</div>
@@ -513,7 +513,7 @@ Please note that this behavior comes with a potential drawback of `overflow`—w
513513
Here's an example navbar using `.navbar-nav-scroll` with `style="scroll-height: 100px;"`, with some extra margin utilities for optimum spacing.
514514

515515
{{< example >}}
516-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
516+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
517517
<div class="container-fluid">
518518
<a class="navbar-brand" href="#">Navbar scroll</a>
519519
<button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarScroll" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
@@ -564,7 +564,7 @@ Navbar togglers are left-aligned by default, but should they follow a sibling el
564564
With no `.navbar-brand` shown at the smallest breakpoint:
565565

566566
{{< example >}}
567-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
567+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
568568
<div class="container-fluid">
569569
<button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
570570
<span class="navbar-toggler-icon"></span>
@@ -594,7 +594,7 @@ With no `.navbar-brand` shown at the smallest breakpoint:
594594
With a brand name shown on the left and toggler on the right:
595595

596596
{{< example >}}
597-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
597+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
598598
<div class="container-fluid">
599599
<a class="navbar-brand" href="#">Navbar</a>
600600
<button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
@@ -624,7 +624,7 @@ With a brand name shown on the left and toggler on the right:
624624
With a toggler on the left and brand name on the right:
625625

626626
{{< example >}}
627-
<nav class="navbar navbar-expand-lg bg-body-tertiary"">
627+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
628628
<div class="container-fluid">
629629
<button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
630630
<span class="navbar-toggler-icon"></span>
@@ -743,13 +743,13 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
743743
<nav class="navbar navbar-dark bg-dark fixed-top">
744744
<div class="container-fluid">
745745
<a class="navbar-brand" href="#">Offcanvas dark navbar</a>
746-
<button class="navbar-toggler" type="button" data-cui-toggle="offcanvas" data-cui-target="#offcanvasDarkNavbar" aria-controls="offcanvasDarkNavbar">
746+
<button class="navbar-toggler" type="button" data-coreui-toggle="offcanvas" data-coreui-target="#offcanvasDarkNavbar" aria-controls="offcanvasDarkNavbar">
747747
<span class="navbar-toggler-icon"></span>
748748
</button>
749749
<div class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="offcanvasDarkNavbar" aria-labelledby="offcanvasDarkNavbarLabel">
750750
<div class="offcanvas-header">
751751
<h5 class="offcanvas-title" id="offcanvasDarkNavbarLabel">Dark offcanvas</h5>
752-
<button type="button" class="btn-close btn-close-white" data-cui-dismiss="offcanvas" aria-label="Close"></button>
752+
<button type="button" class="btn-close btn-close-white" data-coreui-dismiss="offcanvas" aria-label="Close"></button>
753753
</div>
754754
<div class="offcanvas-body">
755755
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
@@ -760,7 +760,7 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
760760
<a class="nav-link" href="#">Link</a>
761761
</li>
762762
<li class="nav-item dropdown">
763-
<a class="nav-link dropdown-toggle" href="#" role="button" data-cui-toggle="dropdown" aria-expanded="false">
763+
<a class="nav-link dropdown-toggle" href="#" role="button" data-coreui-toggle="dropdown" aria-expanded="false">
764764
Dropdown
765765
</a>
766766
<ul class="dropdown-menu dropdown-menu-dark">

docs/content/components/navs-tabs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ The tabs plugin also works with pills.
438438
<button class="nav-link" id="pills-contact-tab" data-coreui-toggle="pill" data-coreui-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</button>
439439
</li>
440440
<li class="nav-item" role="presentation">
441-
<button class="nav-link" id="pills-disabled-tab" data-cui-toggle="pill" data-cui-target="#pills-disabled" type="button" role="tab" aria-controls="pills-disabled" aria-selected="false" disabled>Disabled</button>
441+
<button class="nav-link" id="pills-disabled-tab" data-coreui-toggle="pill" data-coreui-target="#pills-disabled" type="button" role="tab" aria-controls="pills-disabled" aria-selected="false" disabled>Disabled</button>
442442
</li>
443443
</ul>
444444
<div class="tab-content" id="pills-tabContent">
@@ -469,7 +469,7 @@ The tabs plugin also works with pills.
469469
<button class="nav-link" id="pills-contact-tab" data-coreui-toggle="pill" data-coreui-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</button>
470470
</li>
471471
<li class="nav-item" role="presentation">
472-
<button class="nav-link" id="pills-disabled-tab" data-cui-toggle="pill" data-cui-target="#pills-disabled" type="button" role="tab" aria-controls="pills-disabled" aria-selected="false" disabled>Disabled</button>
472+
<button class="nav-link" id="pills-disabled-tab" data-coreui-toggle="pill" data-coreui-target="#pills-disabled" type="button" role="tab" aria-controls="pills-disabled" aria-selected="false" disabled>Disabled</button>
473473
</li>
474474
</ul>
475475
<div class="tab-content" id="pills-tabContent">
@@ -591,7 +591,7 @@ triggerTabList.forEach(triggerEl => {
591591
You can activate individual tabs in several ways:
592592

593593
```js
594-
const triggerEl = document.querySelector('#myTab button[data-cui-target="#profile"]')
594+
const triggerEl = document.querySelector('#myTab button[data-coreui-target="#profile"]')
595595
coreui.Tab.getInstance(triggerEl).show() // Select tab by name
596596

597597
const triggerFirstTabEl = document.querySelector('#myTab li:first-child button')
@@ -655,7 +655,7 @@ If no tab was already active, then the `hide.coreui.tab` and `hidden.coreui.tab`
655655
{{< /bs-table >}}
656656

657657
```js
658-
const tabEl = document.querySelector('button[data-cui-toggle="tab"]')
658+
const tabEl = document.querySelector('button[data-coreui-toggle="tab"]')
659659
tabEl.addEventListener('shown.coreui.tab', event => {
660660
event.target // newly activated tab
661661
event.relatedTarget // previous active tab

0 commit comments

Comments
 (0)