Skip to content

Commit ade1538

Browse files
Remove .list-inline in favour of the grid and remove list styles from the grid by default
1 parent e83c495 commit ade1538

File tree

7 files changed

+14
-25
lines changed

7 files changed

+14
-25
lines changed

scss/_grid.scss

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
@if $enable-grid-classes {
4545
.row {
4646
@include make-row();
47+
@include list-unstyled(); // Remove padding and list styles for `ul`s
4748

4849
> * {
4950
@include make-col-ready();

scss/_type.scss

-13
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,6 @@
7272
@include list-unstyled();
7373
}
7474

75-
// Inline turns list items into inline-block
76-
.list-inline {
77-
@include list-unstyled();
78-
}
79-
.list-inline-item {
80-
display: inline-block;
81-
82-
&:not(:last-child) {
83-
margin-right: $list-inline-padding;
84-
}
85-
}
86-
87-
8875
//
8976
// Misc
9077
//

scss/_variables.scss

-2
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,6 @@ $dt-font-weight: $font-weight-bold !default;
474474

475475
$nested-kbd-font-weight: $font-weight-bold !default;
476476

477-
$list-inline-padding: .5rem !default;
478-
479477
$mark-bg: #fcf8e3 !default;
480478

481479
$hr-margin-y: $spacer !default;

scss/bootstrap-grid.scss

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ html {
2121
@import "mixins/breakpoints";
2222
@import "mixins/grid-framework";
2323
@import "mixins/grid";
24+
@import "mixins/lists";
2425
@import "mixins/utilities";
2526

2627
@import "grid";

site/content/docs/4.3/content/typography.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ Remove the default `list-style` and left margin on list items (immediate childre
227227
</ul>
228228
{{< /example >}}
229229

230-
### Inline
230+
### Inline lists
231231

232-
Remove a list's bullets and apply some light `margin` with a combination of two classes, `.list-inline` and `.list-inline-item`.
232+
Use the grid with (optionally with [gutter classes]({{< docsref "/layout/grid#gutters" >}}) to change spacing between the list items) to create an inline list. The list bullets are removed by default from `.row`.
233233

234234
{{< example >}}
235-
<ul class="list-inline">
236-
<li class="list-inline-item">Lorem ipsum</li>
237-
<li class="list-inline-item">Phasellus iaculis</li>
238-
<li class="list-inline-item">Nulla volutpat</li>
235+
<ul class="row gx-2">
236+
<li class="col-auto">Lorem ipsum</li>
237+
<li class="col-auto">Phasellus iaculis</li>
238+
<li class="col-auto">Nulla volutpat</li>
239239
</ul>
240240
{{< /example >}}
241241

site/content/docs/4.3/examples/checkout/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ <h4>Payment</h4>
223223

224224
<footer class="my-5 pt-5 text-muted text-center text-small">
225225
<p class="mb-1">&copy; 2017-{{< year >}} Company Name</p>
226-
<ul class="list-inline">
227-
<li class="list-inline-item"><a href="#">Privacy</a></li>
228-
<li class="list-inline-item"><a href="#">Terms</a></li>
229-
<li class="list-inline-item"><a href="#">Support</a></li>
226+
<ul class="row g-2 justify-content-center">
227+
<li class="col-auto"><a href="#">Privacy</a></li>
228+
<li class="col-auto"><a href="#">Terms</a></li>
229+
<li class="col-auto"><a href="#">Support</a></li>
230230
</ul>
231231
</footer>
232232
</div>

site/content/docs/4.3/migration.md

+2
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ Changes to any layout tools and our grid system.
5959
- Responsive gutter classes can be used to control the gutter width in as well horizontal, vertical or both directions.
6060
- The gutter width is now set in `rem` and slightly increased from `30px` to `2rem` (32px).
6161
- Better nesting support. A `.row` class can now be used as a direct child of another `.row`.
62+
- The bullet points and padding from `<ul class="row">`s are removed by default, so no need to add `.list-unstyled` anymore.
6263

6364
## Content, Reboot, etc
6465

6566
Changes to Reboot, typography, tables, and more.
6667

6768
- **Todo:** Make RFS enabled by default
6869
- Reset default horizontal `padding-left` on `<ul>` and `<ol>` elements from browser default `40px` to `2rem`.
70+
- `.list-inline` is removed in favor of using the grid (`.row`) in combination with `.col-auto` list items. See [inline lists documentation]({{< docsref "/content/typography#inline-lists" >}}).
6971
- Simplified table styles (no more 2px border on `thead > th` elements) and tightened cell padding.
7072
- Dropped `.pre-scrollable` class. [See #29135](https://github.com/twbs/bootstrap/pull/29135)
7173
- `.text-*` utilities do not add hover and focus states to links anymore. `.link-*` helper classes can be used instead. [See #29267](https://github.com/twbs/bootstrap/pull/29267)

0 commit comments

Comments
 (0)