Skip to content
Merged

2.7 #43

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
37 changes: 37 additions & 0 deletions sass/base/utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,43 @@
.img-right img, .img-left img, .img-center img { display: block; margin: 0 auto .6; }
.img-right figcaption, .img-left figcaption, .img-center figcaption { display: block; color: Gray; font-style: italic; }

/* Flexbox utility classes */
.flex {
display: flex;
}

.dir-row { flex-direction: row; }
.dir-row-reverse { flex-direction: row-reverse; }
.dir-column { flex-direction: column; }
.dir-column-reverse { flex-direction: column-reverse; }

/* Grid wrapping */
.fw-wrap { flex-wrap: wrap; }
.fw-nowrap { flex-wrap: nowrap; }

/* Alignment */

/* Justify content */
.jc-flex-start { justify-content: flex-start; }
.jc-flex-end { justify-content: flex-end; }
.jc-center { justify-content: center; }
.jc-space-around { justify-content: space-around; }
.jc-space-between { justify-content: space-between; }

/* Align items */
.ai-flex-start { align-items: flex-start; }
.ai-flex-end { align-items: flex-end; }
.ai-center { align-items: center; }
.ai-space-around { align-items: baseline; }
.ai-stretch { align-items: stretch; }

/* Align content */
.ac-flex-start { align-content: flex-start; }
.ac-flex-end { align-content: flex-end; }
.ac-center { align-content: center; }
.ac-space-around { align-content: space-around; }
.ac-space-between { align-content: space-between; }

@media only screen and (min-width: $b3) {
.img-right { float: right; margin: .8rem 0 1.6rem 4.8rem; }
.img-left { float: left; margin: .8rem 4.8rem 1.6rem 0; }
Expand Down
35 changes: 3 additions & 32 deletions sass/layout/grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/* Make children of grid items equal height */
&-equal-height {

> * {
display: flex;

Expand All @@ -58,38 +58,9 @@
display: block;
}


&.dir-row { flex-direction: row; }
&.dir-row-reverse { flex-direction: row-reverse; }
&.dir-column { flex-direction: column; }
&.dir-column-reverse { flex-direction: column-reverse; }

/* Grid wrapping */
&.wrap { flex-wrap: wrap; }
&.nowrap { flex-wrap: nowrap; }

/* Alignment */

/* Justify content */
&.jc-flex-start { justify-content: flex-start; }
&.jc-flex-end { justify-content: flex-end; }
&.jc-center { justify-content: center; }
&.jc-space-around { justify-content: space-around; }
&.jc-space-between { justify-content: space-between; }

/* Align items */
&.ai-flex-start { align-items: flex-start; }
&.ai-flex-end { align-items: flex-end; }
&.ai-center { align-items: center; }
&.ai-space-around { align-items: baseline; }
&.ai-stretch { align-items: stretch; }

/* Align content */
&.ac-flex-start { align-content: flex-start; }
&.ac-flex-end { align-content: flex-end; }
&.ac-center { align-content: center; }
&.ac-space-around { align-content: space-around; }
&.ac-space-between { align-content: space-between; }
&.wrap { flex-wrap: wrap; }
&.nowrap { flex-wrap: nowrap; }

/* Grid items
Every direct child within .g is a grid item
Expand Down