Last active
December 25, 2015 20:29
-
-
Save mjn666/7034716 to your computer and use it in GitHub Desktop.
Generate a list of thumbnails of n * items per row; Defaults to 4.
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
| // USAGE: ul.my-gallery {@include thumbnail-gallery(2)} | |
| @mixin thumbnail-gallery($items: 4) {clear:both; list-style:none; padding:0; margin:0 -1%; width:auto; @extend group; | |
| li {width:(100% - (2 * $items)) / $items; display:inline-block; margin:0 1% 1%; float:left; | |
| a {text-align:center; display:block; margin:0 auto;} | |
| img {display:block; width:100%; height:auto;} | |
| } | |
| } | |
| // Clearfix | |
| .group {zoom:1; | |
| &:before, &:after {content:'';display:table;position:relative;} | |
| &:after {clear:both} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment