Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add display: inline-flex; to flexbox rules #271

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/flexbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
These flexbox-based utilities can replace the need for a grid system in many instances, and provide powerful constraint-based micro-layout solutions.
To learn more about the flexbox module, see [Using CSS flexible boxes](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes) and the [CSS Flexible Box Layout Module Specification](https://www.w3.org/TR/css-flexbox-1/).

To set a container to display flex, add the `.flex` class.
To set a container to display flex, add the `.flex` or `.inline-flex` class.

```html
<div class="flex">
Expand All @@ -11,7 +11,7 @@ To set a container to display flex, add the `.flex` class.
</div>
```

To set a container to display flex at certain breakpoints, use the `.sm-flex`, `.md-flex`, and `.lg-flex` styles.
To set a container to display flex at certain breakpoints, use the `.sm-flex`, `.md-flex`, and `.lg-flex` styles (or their `.*-inline-flex` equivalents).

```html
<div class="sm-flex">
Expand Down
4 changes: 4 additions & 0 deletions modules/flexbox/index.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@

.flex { display: flex }
.inline-flex { display: inline-flex; }

@media (--breakpoint-sm) {
.sm-flex { display: flex }
.sm-inline-flex { display: inline-flex }
}

@media (--breakpoint-md) {
.md-flex { display: flex }
.md-inline-flex { display: inline-flex }
}

@media (--breakpoint-lg) {
.lg-flex { display: flex }
.lg-inline-flex { display: inline-flex }
}

.flex-column { flex-direction: column }
Expand Down