Last active
June 3, 2016 16:49
-
-
Save apsolut/8b107830de429f7c0fe8e0def1c8dd28 to your computer and use it in GitHub Desktop.
WordPress Gallery mixin example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* stop(); Bourbon Time | |
* Bourbon-Neat smiple mixin for WordPress Gallery | |
* Extend to your needs - lets('bourbon').start(); | |
* damir created this for alex | |
*/ | |
$gallery-column-checker : (1, 2, 3, 4, 6, 8, 12, 24); | |
.gallery { | |
@include row(); | |
@each $columns-option in $gallery-column-checker { | |
&.gallery-columns-#{$columns-option} > .gallery-item { | |
@include span-columns( (24/$columns-option) ); | |
&:nth-child(#{$columns-option}n) { | |
margin-right: 0; | |
} | |
&:nth-child(#{$columns-option}n+1) { | |
clear: both; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment