Skip to content
New issue

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

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

Already on GitHub? # to your account

Flexbox helpers #3047

Merged
merged 5 commits into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions sass/helpers/_all.sass
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@charset "utf-8"

@import "color.sass"
@import "flex.sass"
@import "float.sass"
@import "other.sass"
@import "overflow.sass"
Expand Down
35 changes: 35 additions & 0 deletions sass/helpers/flex.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$flex-directions-values: row, row-reverse, column, column-reverse
@each $value in $flex-directions-values
.is-flex-#{$value}
flex-direction: $value !important

$flex-wrap-values: nowrap, wrap, wrap-reverse
@each $value in $flex-wrap-values
.is-flex-#{$value}
flex-wrap: $value !important

$justify-content-values: flex-start, flex-end, center, space-between, space-around, space-evenly, start, end, left, right
@each $value in $justify-content-values
.is-justify-#{$value}
justify-content: $value !important

$align-content-values: flex-start, flex-end, center, space-between, space-around, space-evenly, stretch, start, end, baseline
@each $value in $align-content-values
.is-content-#{$value}
align-content: $value !important

$align-items-values: stretch, flex-start, flex-end, center, baseline, start, end, self-start, self-end
@each $value in $align-items-values
.is-items-#{$value}
align-items: $value !important

$align-self-values: auto, flex-start, flex-end, center, baseline, stretch
@each $value in $align-self-values
.is-self-#{$value}
align-self: $value !important

$flex-operators: grow, shrink
@each $operator in $flex-operators
@for $i from 0 through 5
.is-flex-#{$operator}-#{$i}
flex-#{$operator}: $i !important