Last active
August 29, 2015 13:57
-
-
Save jamiehs/9678998 to your computer and use it in GitHub Desktop.
Magical mixins with trees
This file contains 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
@mixin gallery-items($size) { | |
.item { | |
float: left; | |
.thumbnail { | |
margin-bottom: $size/4; | |
text-align: center; | |
width: $size; | |
height: $size; | |
.vertical-helper { | |
display: inline-block; | |
height: 100%; | |
vertical-align: middle; | |
width: 1px; | |
} | |
} | |
} | |
} | |
#some-page { | |
.gallery { | |
@include gallery-items(200px); | |
} | |
} | |
#some-other-page { | |
#other-element { | |
.another-gallery { | |
@include gallery-items(400px); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment