Skip to content

Commit

Permalink
[docs] Devdocs Bootstrap directional utilities refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
roland04 committed Jun 25, 2024
1 parent 31d47d6 commit 4581d99
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/guides/bs5migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,36 @@ The `.no-gutters` grid class has been replaced with `.g-0`.
```

</ValidExample>

### Directional utilities

Several utilities have been renamed to use logical property nammes instead of directional ones.

- Renamed .float-left and .float-right to .float-start and .float-end.
- Renamed .border-left and .border-right to .border-start and .border-end.
- Renamed .rounded-left and .rounded-right to .rounded-start and .rounded-end.
- Renamed .ml-* and .mr-* to .ms-* and .me-*.
- Renamed .pl-* and .pr-* to .ps-* and .pe-*.
- Renamed .text-left and .text-right to .text-start and .text-end.

<InvalidExample title="Don't">

```html
<div class="ml-3 pr-sm-3">
<div class="border-left text-left">[...]</div>
<div class="float-right mr-auto">[...]</div>
</div>
```

</InvalidExample>

<ValidExample title="Do">

```html
<div class="ms-3 pe-sm-3">
<div class="border-start text-start">[...]</div>
<div class="float-end me-auto">[...]</div>
</div>
```

</ValidExample>

0 comments on commit 4581d99

Please sign in to comment.