1
1
mirror of https://github.com/primer/css.git synced 2024-12-29 17:12:27 +03:00

Merge pull request #1148 from MauricioHernanCabrera/flex-wrap-reverse

flex wrap reverse added
This commit is contained in:
simurai 2020-09-08 13:25:43 +09:00 committed by GitHub
commit 3e826643bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 4 deletions

View File

@ -134,6 +134,7 @@ You can choose whether flex items are forced into a single line or wrapped onto
```css
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
```
### Classes
@ -142,6 +143,7 @@ You can choose whether flex items are forced into a single line or wrapped onto
| --- | --- |
| `.flex-wrap` | Flex items will break onto multiple lines (default) |
| `.flex-nowrap` | Flex items are laid out in a single line, even if they overflow |
| `.flex-wrap-reverse` | Behaves the same as wrap but cross-start and cross-end are permuted. |
### `flex-wrap` example
@ -175,6 +177,22 @@ You can choose whether flex items are forced into a single line or wrapped onto
</div>
```
### `flex-wrap-reverse` example
```html live
<div class="border d-flex flex-wrap-reverse">
<div class="p-5 px-6 border bg-gray-light">1</div>
<div class="p-5 px-6 border bg-gray-light">2</div>
<div class="p-5 px-6 border bg-gray-light">3</div>
<div class="p-5 px-6 border bg-gray-light">4</div>
<div class="p-5 px-6 border bg-gray-light">5</div>
<div class="p-5 px-6 border bg-gray-light">6</div>
<div class="p-5 px-6 border bg-gray-light">7</div>
<div class="p-5 px-6 border bg-gray-light">8</div>
<div class="p-5 px-6 border bg-gray-light">9</div>
</div>
```
## Justify content
Use these classes to distribute space between and around flex items along the **main axis** of the container.

View File

@ -11,6 +11,7 @@
.flex#{$variant}-wrap { flex-wrap: wrap !important; }
.flex#{$variant}-nowrap { flex-wrap: nowrap !important; }
.flex#{$variant}-wrap-reverse { flex-wrap: wrap-reverse !important; }
.flex#{$variant}-justify-start { justify-content: flex-start !important; }
.flex#{$variant}-justify-end { justify-content: flex-end !important; }