mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
Merge branch 'main' into nav-underline
This commit is contained in:
@@ -12,6 +12,17 @@
|
|||||||
@include border-radius($list-group-border-radius);
|
@include border-radius($list-group-border-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-group-numbered {
|
||||||
|
list-style-type: none;
|
||||||
|
counter-reset: section;
|
||||||
|
|
||||||
|
> li::before {
|
||||||
|
// Increments only this instance of the section counter
|
||||||
|
content: counters(section, ".") ". ";
|
||||||
|
counter-increment: section;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Interactive list items
|
// Interactive list items
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -94,6 +94,48 @@ Add `.list-group-flush` to remove some borders and rounded corners to render lis
|
|||||||
</ul>
|
</ul>
|
||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
|
|
||||||
|
## Numbered
|
||||||
|
|
||||||
|
Add the `.list-group-numbered` modifier class (and optionally use an `<ol>` element) to opt into numbered list group items. Numbers are generated via CSS (as opposed to a `<ol>`s default browser styling) for better placement inside list group items and to allow for better customization.
|
||||||
|
|
||||||
|
Numbers are generated by `counter-reset` on the `<ol>`, and then styled and placed with a `::before` psuedo-element on the `<li>` with `counter-increment` and `content`.
|
||||||
|
|
||||||
|
{{< example >}}
|
||||||
|
<ol class="list-group list-group-numbered">
|
||||||
|
<li class="list-group-item">Cras justo odio</li>
|
||||||
|
<li class="list-group-item">Cras justo odio</li>
|
||||||
|
<li class="list-group-item">Cras justo odio</li>
|
||||||
|
</ol>
|
||||||
|
{{< /example >}}
|
||||||
|
|
||||||
|
These work great with custom content as well.
|
||||||
|
|
||||||
|
{{< example >}}
|
||||||
|
<ol class="list-group list-group-numbered">
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||||
|
<div class="ms-2 me-auto">
|
||||||
|
<div class="fw-bold">Subheading</div>
|
||||||
|
Cras justo odio
|
||||||
|
</div>
|
||||||
|
<span class="badge bg-primary rounded-pill">14</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||||
|
<div class="ms-2 me-auto">
|
||||||
|
<div class="fw-bold">Subheading</div>
|
||||||
|
Cras justo odio
|
||||||
|
</div>
|
||||||
|
<span class="badge bg-primary rounded-pill">14</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||||
|
<div class="ms-2 me-auto">
|
||||||
|
<div class="fw-bold">Subheading</div>
|
||||||
|
Cras justo odio
|
||||||
|
</div>
|
||||||
|
<span class="badge bg-primary rounded-pill">14</span>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
{{< /example >}}
|
||||||
|
|
||||||
## Horizontal
|
## Horizontal
|
||||||
|
|
||||||
Add `.list-group-horizontal` to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant `.list-group-horizontal-{sm|md|lg|xl|xxl}` to make a list group horizontal starting at that breakpoint's `min-width`. Currently **horizontal list groups cannot be combined with flush list groups.**
|
Add `.list-group-horizontal` to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant `.list-group-horizontal-{sm|md|lg|xl|xxl}` to make a list group horizontal starting at that breakpoint's `min-width`. Currently **horizontal list groups cannot be combined with flush list groups.**
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ You can then remix that once again with size-specific column classes.
|
|||||||
|
|
||||||
## Inline forms
|
## Inline forms
|
||||||
|
|
||||||
Use the `.col-auto` class to create horizontal layouts. By adding [gutter modifier classes]({{< docsref "/layout/gutters" >}}), we'll have gutters in horizontal and vertical directions. The `.align-items-center` aligns the form elements to the middle, making the `.form-checkbox` align properly.
|
Use the `.row-cols-*` classes to create responsive horizontal layouts. By adding [gutter modifier classes]({{< docsref "/layout/gutters" >}}), we'll have gutters in horizontal and vertical directions. On narrow mobile viewports, the `.col-12` helps stack the form controls and more. The `.align-items-center` aligns the form elements to the middle, making the `.form-checkbox` align properly.
|
||||||
|
|
||||||
{{< example >}}
|
{{< example >}}
|
||||||
<form class="row row-cols-lg-auto g-3 align-items-center">
|
<form class="row row-cols-lg-auto g-3 align-items-center">
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ toc: true
|
|||||||
|
|
||||||
## v5.0.0-beta3
|
## v5.0.0-beta3
|
||||||
|
|
||||||
|
### Components
|
||||||
|
|
||||||
|
- Added new [`.list-group-numbered` modifier]({{< docsref "/components/list-group#numbered" >}}) to list groups.
|
||||||
|
|
||||||
### JavaScript
|
### JavaScript
|
||||||
|
|
||||||
- All plugins can now accept a CSS selector as the first argument. You can either pass a DOM element or any valid CSS selector to create a new instance of the plugin:
|
- All plugins can now accept a CSS selector as the first argument. You can either pass a DOM element or any valid CSS selector to create a new instance of the plugin:
|
||||||
|
|||||||
Reference in New Issue
Block a user