Skip to content

Commit 32d0379

Browse files
committed
docs: update documentation
1 parent bc2cf42 commit 32d0379

29 files changed

+277
-112
lines changed

docs/content/components/alerts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Similarly, you can use [flexbox utilities]({{< docsref "/utilities/flex" >}}) an
8383
Need more than one icon for your alerts? Consider using more Bootstrap Icons and making a local SVG sprite like so to easily reference the same icons repeatedly.
8484

8585
{{< example >}}
86-
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
86+
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
8787
<symbol id="check-circle-fill" viewBox="0 0 16 16">
8888
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
8989
</symbol>

docs/content/components/button-group.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ Create a set of buttons that appear vertically stacked rather than horizontally.
199199
<button type="button" class="btn btn-primary">Button</button>
200200
<button type="button" class="btn btn-primary">Button</button>
201201
<button type="button" class="btn btn-primary">Button</button>
202-
<button type="button" class="btn btn-primary">Button</button>
203-
<button type="button" class="btn btn-primary">Button</button>
204202
</div>
205203
</div>
206204
{{< /example >}}
@@ -219,9 +217,7 @@ Create a set of buttons that appear vertically stacked rather than horizontally.
219217
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
220218
</ul>
221219
</div>
222-
<button type="button" class="btn btn-primary">Button</button>
223-
<button type="button" class="btn btn-primary">Button</button>
224-
<div class="btn-group" role="group">
220+
<div class="btn-group dropstart" role="group">
225221
<button id="btnGroupVerticalDrop2" type="button" class="btn btn-primary dropdown-toggle" data-coreui-toggle="dropdown" aria-expanded="false">
226222
Dropdown
227223
</button>
@@ -230,7 +226,7 @@ Create a set of buttons that appear vertically stacked rather than horizontally.
230226
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
231227
</ul>
232228
</div>
233-
<div class="btn-group" role="group">
229+
<div class="btn-group dropend" role="group">
234230
<button id="btnGroupVerticalDrop3" type="button" class="btn btn-primary dropdown-toggle" data-coreui-toggle="dropdown" aria-expanded="false">
235231
Dropdown
236232
</button>
@@ -239,7 +235,7 @@ Create a set of buttons that appear vertically stacked rather than horizontally.
239235
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
240236
</ul>
241237
</div>
242-
<div class="btn-group" role="group">
238+
<div class="btn-group dropup" role="group">
243239
<button id="btnGroupVerticalDrop4" type="button" class="btn btn-primary dropdown-toggle" data-coreui-toggle="dropdown" aria-expanded="false">
244240
Dropdown
245241
</button>

docs/content/components/buttons.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,29 @@ Visually, these toggle buttons are identical to the [checkbox toggle buttons]({{
235235
Add `data-coreui-toggle="button"` to toggle a button's `active` state. If you're pre-toggling a button, you must manually add the `.active` class **and** `aria-pressed="true"` to the `<button>`.
236236

237237
{{< example >}}
238-
<button type="button" class="btn btn-primary" data-coreui-toggle="button" autocomplete="off">Toggle button</button>
239-
<button type="button" class="btn btn-primary active" data-coreui-toggle="button" autocomplete="off" aria-pressed="true">Active toggle button</button>
240-
<button type="button" class="btn btn-primary" disabled data-coreui-toggle="button" autocomplete="off">Disabled toggle button</button>
238+
<p class="d-inline-flex gap-1">
239+
<button type="button" class="btn" data-coreui-toggle="button">Toggle button</button>
240+
<button type="button" class="btn active" data-coreui-toggle="button" aria-pressed="true">Active toggle button</button>
241+
<button type="button" class="btn" disabled data-coreui-toggle="button">Disabled toggle button</button>
242+
</p>
243+
<p class="d-inline-flex gap-1">
244+
<button type="button" class="btn btn-primary" data-coreui-toggle="button">Toggle button</button>
245+
<button type="button" class="btn btn-primary active" data-coreui-toggle="button" aria-pressed="true">Active toggle button</button>
246+
<button type="button" class="btn btn-primary" disabled data-coreui-toggle="button">Disabled toggle button</button>
247+
</p>
241248
{{< /example >}}
242249

243250
{{< example >}}
244-
<a href="#" class="btn btn-primary" role="button" data-coreui-toggle="button">Toggle link</a>
245-
<a href="#" class="btn btn-primary active" role="button" data-coreui-toggle="button" aria-pressed="true">Active toggle link</a>
246-
<a href="#" class="btn btn-primary disabled" tabindex="-1" aria-disabled="true" role="button" data-coreui-toggle="button">Disabled toggle link</a>
251+
<p class="d-inline-flex gap-1">
252+
<a href="#" class="btn" role="button" data-coreui-toggle="button">Toggle link</a>
253+
<a href="#" class="btn active" role="button" data-coreui-toggle="button" aria-pressed="true">Active toggle link</a>
254+
<a class="btn disabled" aria-disabled="true" role="button" data-coreui-toggle="button">Disabled toggle link</a>
255+
</p>
256+
<p class="d-inline-flex gap-1">
257+
<a href="#" class="btn btn-primary" role="button" data-coreui-toggle="button">Toggle link</a>
258+
<a href="#" class="btn btn-primary active" role="button" data-coreui-toggle="button" aria-pressed="true">Active toggle link</a>
259+
<a class="btn btn-primary disabled" aria-disabled="true" role="button" data-coreui-toggle="button">Disabled toggle link</a>
260+
</p>
247261
{{< /example >}}
248262

249263
### Methods

docs/content/components/card.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Add some navigation to a card's header (or block) with CoreUI for Bootstrap's [n
315315
<a class="nav-link" href="#">Link</a>
316316
</li>
317317
<li class="nav-item">
318-
<a class="nav-link disabled">Disabled</a>
318+
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
319319
</li>
320320
</ul>
321321
</div>
@@ -338,7 +338,7 @@ Add some navigation to a card's header (or block) with CoreUI for Bootstrap's [n
338338
<a class="nav-link" href="#">Link</a>
339339
</li>
340340
<li class="nav-item">
341-
<a class="nav-link disabled">Disabled</a>
341+
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
342342
</li>
343343
</ul>
344344
</div>

docs/content/components/carousel.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,32 +241,36 @@ Carousels support swiping left/right on touchscreen devices to move between slid
241241

242242
## Dark variant
243243

244+
{{< deprecated-in "5.0.0" >}}
245+
244246
Add `.carousel-dark` to the `.carousel` for darker controls, indicators, and captions. Controls have been inverted from their default white fill with the `filter` CSS property. Captions and controls have additional Sass variables that customize the `color` and `background-color`.
245247

248+
{{< callout-deprecated-dark-variants "carousel" >}}
249+
246250
{{< example >}}
247-
<div id="carouselExampleDark" class="carousel carousel-dark slide" data-coreui-ride="carousel">
251+
<div id="carouselExampleDark" class="carousel carousel-dark slide">
248252
<div class="carousel-indicators">
249253
<button type="button" data-coreui-target="#carouselExampleDark" data-coreui-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
250254
<button type="button" data-coreui-target="#carouselExampleDark" data-coreui-slide-to="1" aria-label="Slide 2"></button>
251255
<button type="button" data-coreui-target="#carouselExampleDark" data-coreui-slide-to="2" aria-label="Slide 3"></button>
252256
</div>
253257
<div class="carousel-inner">
254258
<div class="carousel-item active" data-coreui-interval="10000">
255-
{{< placeholder width="800" height="400" class="docs-placeholder-img-lg d-block w-100" color="#aaa" background="#f5f5f5" text="First slide" >}}
259+
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#aaa" background="#f5f5f5" text="First slide" >}}
256260
<div class="carousel-caption d-none d-md-block">
257261
<h5>First slide label</h5>
258262
<p>Some representative placeholder content for the first slide.</p>
259263
</div>
260264
</div>
261265
<div class="carousel-item" data-coreui-interval="2000">
262-
{{< placeholder width="800" height="400" class="docs-placeholder-img-lg d-block w-100" color="#bbb" background="#eee" text="Second slide" >}}
266+
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#bbb" background="#eee" text="Second slide" >}}
263267
<div class="carousel-caption d-none d-md-block">
264268
<h5>Second slide label</h5>
265269
<p>Some representative placeholder content for the second slide.</p>
266270
</div>
267271
</div>
268272
<div class="carousel-item">
269-
{{< placeholder width="800" height="400" class="docs-placeholder-img-lg d-block w-100" color="#999" background="#e5e5e5" text="Third slide" >}}
273+
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#999" background="#e5e5e5" text="Third slide" >}}
270274
<div class="carousel-caption d-none d-md-block">
271275
<h5>Third slide label</h5>
272276
<p>Some representative placeholder content for the third slide.</p>

docs/content/components/collapse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Click the buttons below to show and hide another element via class changes:
3030
You can use a link with the `href` attribute, or a button with the `data-coreui-target` attribute. In both samples, the `data-coreui-toggle="collapse""` is required.
3131

3232
{{< example >}}
33-
<p>
33+
<p class="d-inline-flex gap-1">
3434
<a class="btn btn-primary" data-coreui-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
3535
Link with href
3636
</a>
@@ -74,7 +74,7 @@ A `<button>` or `<a>` can show and hide multiple elements by referencing them wi
7474
Multiple `<button>` or `<a>` can show and hide an element if they each reference it with their `href` or `data-coreui-target` attribute
7575

7676
{{< example >}}
77-
<p>
77+
<p class="d-inline-flex gap-1">
7878
<a class="btn btn-primary" data-coreui-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Toggle first element</a>
7979
<button class="btn btn-primary" type="button" data-coreui-toggle="collapse" data-coreui-target="#multiCollapseExample2" aria-expanded="false" aria-controls="multiCollapseExample2">Toggle second element</button>
8080
<button class="btn btn-primary" type="button" data-coreui-toggle="collapse" data-coreui-target=".multi-collapse" aria-expanded="false" aria-controls="multiCollapseExample1 multiCollapseExample2">Toggle both elements</button>

docs/content/components/dropdowns.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,12 @@ Button dropdowns work with buttons of all sizes, including default and split dro
354354

355355
## Dark dropdowns
356356

357+
{{< deprecated-in "5.0.0" >}}
358+
357359
Opt into darker dropdowns to match a dark navbar or custom style by adding `.dropdown-menu-dark` onto an existing `.dropdown-menu`. No changes are required to the dropdown items.
358360

361+
{{< callout-deprecated-dark-variants "dropdown-menu" >}}
362+
359363
{{< example >}}
360364
<div class="dropdown">
361365
<button class="btn btn-secondary dropdown-toggle" type="button" data-coreui-toggle="dropdown" aria-expanded="false">
@@ -383,9 +387,9 @@ And putting it to use in a navbar:
383387
<div class="collapse navbar-collapse" id="navbarNavDarkDropdown">
384388
<ul class="navbar-nav">
385389
<li class="nav-item dropdown">
386-
<a class="nav-link dropdown-toggle" href="#" role="button" data-coreui-toggle="dropdown" aria-expanded="false">
390+
<button class="btn btn-dark dropdown-toggle" data-coreui-toggle="dropdown" aria-expanded="false">
387391
Dropdown
388-
</a>
392+
</button>
389393
<ul class="dropdown-menu dropdown-menu-dark">
390394
<li><a class="dropdown-item" href="#">Action</a></li>
391395
<li><a class="dropdown-item" href="#">Another action</a></li>
@@ -663,7 +667,7 @@ Add `.disabled` to items in the dropdown to **style them as disabled**.
663667
{{< example >}}
664668
<ul class="dropdown-menu">
665669
<li><a class="dropdown-item" href="#">Regular link</a></li>
666-
<li><a class="dropdown-item disabled">Disabled link</a></li>
670+
<li><a class="dropdown-item disabled" aria-disabled="true">Disabled link</a></li>
667671
<li><a class="dropdown-item" href="#">Another link</a></li>
668672
</ul>
669673
{{< /example >}}

docs/content/components/list-group.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Be sure to **not use the standard `.btn` classes here**.
6767
<a href="#" class="list-group-item list-group-item-action">A second link item</a>
6868
<a href="#" class="list-group-item list-group-item-action">A third link item</a>
6969
<a href="#" class="list-group-item list-group-item-action">A fourth link item</a>
70-
<a class="list-group-item list-group-item-action disabled">A disabled link item</a>
70+
<a class="list-group-item list-group-item-action disabled" aria-disabled="true">A disabled link item</a>
7171
</div>
7272
{{< /example >}}
7373

docs/content/components/navbar.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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">
@@ -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>
@@ -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>
@@ -322,13 +322,17 @@ Mix and match with other components and utilities as needed.
322322
## Color schemes
323323

324324
{{< callout warning >}}
325-
**New in v4.2.6:** CSS variables are applied to `.navbar`, defaulting to the "light" appearance, and can be overridden with `.navbar-dark`.
325+
**New dark navbars in v5.0.0 —** We've deprecated `.navbar-dark` in favor of the new `data-coreui-theme="dark"`. Add `data-coreui-theme="dark"` to the `.navbar` to enable a component-specific color mode. [Learn more about our color modes.]({{< docsref "/customize/color-modes" >}})
326+
327+
---
328+
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`.
326330
{{< /callout >}}
327331

328-
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 `.navbar-dark` for dark background colors. Then, customize with `.bg-*` utilities.
332+
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.
329333

330334
<div class="docs-example">
331-
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
335+
<nav class="navbar navbar-expand-lg bg-dark border-bottom border-body" data-coreui-theme="dark">
332336
<div class="container-fluid">
333337
<a class="navbar-brand" href="#">Navbar</a>
334338
<button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
@@ -357,7 +361,7 @@ Navbar themes are easier than ever thanks to CoreUI for Bootstrap's combination
357361
</div>
358362
</nav>
359363

360-
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
364+
<nav class="navbar navbar-expand-lg bg-primary" data-coreui-theme="dark">
361365
<div class="container-fluid">
362366
<a class="navbar-brand" href="#">Navbar</a>
363367
<button class="navbar-toggler" type="button" data-coreui-toggle="collapse" data-coreui-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
@@ -417,11 +421,11 @@ Navbar themes are easier than ever thanks to CoreUI for Bootstrap's combination
417421
</div>
418422

419423
```html
420-
<nav class="navbar navbar-dark bg-dark">
424+
<nav class="navbar bg-dark border-bottom border-body" data-coreui-theme="dark">
421425
<!-- Navbar content -->
422426
</nav>
423427

424-
<nav class="navbar navbar-dark bg-primary">
428+
<nav class="navbar bg-primary" data-coreui-theme="dark">
425429
<!-- Navbar content -->
426430
</nav>
427431

@@ -535,7 +539,7 @@ Here's an example navbar using `.navbar-nav-scroll` with `style="scroll-height:
535539
</ul>
536540
</li>
537541
<li class="nav-item">
538-
<a class="nav-link disabled">Link</a>
542+
<a class="nav-link disabled" aria-disabled="true">Link</a>
539543
</li>
540544
</ul>
541545
<form class="d-flex" role="search">
@@ -575,7 +579,7 @@ With no `.navbar-brand` shown at the smallest breakpoint:
575579
<a class="nav-link" href="#">Link</a>
576580
</li>
577581
<li class="nav-item">
578-
<a class="nav-link disabled">Disabled</a>
582+
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
579583
</li>
580584
</ul>
581585
<form class="d-flex" role="search">
@@ -605,7 +609,7 @@ With a brand name shown on the left and toggler on the right:
605609
<a class="nav-link" href="#">Link</a>
606610
</li>
607611
<li class="nav-item">
608-
<a class="nav-link disabled">Disabled</a>
612+
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
609613
</li>
610614
</ul>
611615
<form class="d-flex" role="search">
@@ -635,7 +639,7 @@ With a toggler on the left and brand name on the right:
635639
<a class="nav-link" href="#">Link</a>
636640
</li>
637641
<li class="nav-item">
638-
<a class="nav-link disabled">Disabled</a>
642+
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
639643
</li>
640644
</ul>
641645
<form class="d-flex" role="search">
@@ -793,8 +797,12 @@ Some additional CSS variables are also present on `.navbar-nav`:
793797
794798
### SASS variables
795799
800+
Variables for all navbars:
801+
796802
{{< scss-docs name="navbar-variables" file="scss/_variables.scss" >}}
797803
804+
Variables for the [dark navbar](#color-schemes):
805+
798806
{{< scss-docs name="navbar-dark-variables" file="scss/_variables.scss" >}}
799807
800808
### SASS loop

0 commit comments

Comments
 (0)