Merge pull request #142 from redpik/patch-1

wordpress gallery-item: boucle @for
This commit is contained in:
Raphael Goetter 2015-07-09 15:57:45 +02:00
commit ff19385413

View file

@ -271,29 +271,11 @@ img.wp-smiley {
text-align: center; text-align: center;
vertical-align: top; vertical-align: top;
.gallery-columns-2 & { @for $i from 2 through 9 {
max-width: 50%; .gallery-columns-#{$i} & {
$w: floor(10000/$i)/100;
max-width: unquote($w + '%');
} }
.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%;
} }
} }