DRY gallery columns

This commit is contained in:
Joseph Fusco 2016-07-11 09:42:08 -04:00
parent 36768cda37
commit 601fba886f
1 changed files with 5 additions and 31 deletions

View File

@ -8,39 +8,13 @@
vertical-align: top;
width: 100%;
.gallery-columns-2 & {
max-width: 50%;
}
.gallery-columns-3 & {
max-width: 33.33%;
}
.gallery-columns-4 & {
max-width: 25%;
}
.gallery-columns-5 & {
max-width: 20%;
}
.gallery-columns-6 & {
max-width: 16.66%;
}
.gallery-columns-7 & {
max-width: 14.28%;
}
.gallery-columns-8 & {
max-width: 12.5%;
}
.gallery-columns-9 & {
max-width: 11.11%;
@for $i from 2 through 9 {
.gallery-columns-#{$i} {
max-width: ( 100% / $i );
}
}
}
.gallery-caption {
display: block;
}
}