Settings (optional)
Input
@gf { /* default values */
width: 1; /* blob default width */
gutter: 1.5rem; /* gutter width */
display: flex; /* float or flex */
}
Output
/* Does not output anything. */
Rows
Input
.my-class {
gf: row 1.5rem;
}
Output
.my-class {
clear: both;
margin-right: calc(-1 * 1.5rem);
display: flex;
flex-flow: row wrap;
align-items: flex-start;
align-content: flex-start;
}
.my-class::after {
content: "";
display: table;
clear: both;
}
Blobs
Input
.my-class {
gf: blob 1/3 1.5rem flex;
}
Output
.my-class {
margin-right: 1.5rem;
flex: 0 1 calc(33.3336% - 1.5rem);
}
Example
1/8
1/8
blob 1/4
blob 1/6
blob 1/3
blob 1/2
blob 1/2
blob 1/3
blob 2/3
blob 1/4
blob 3/4
blob 2/5
blob 3/5
blob 1/6
blob 1/6
blob 4/6
blob 1/7
blob 2/7
blob 4/7
blob 1/8
blob 2/8
blob 2/8
blob 3/8
.
blob 1/6
blob 2/9
blob 5/9