I'm trying to create a small gallery in the footer of my site. At the moment, the following Sass does actually work but it doesn't seem very efficient to use the one, two and three classes on each footer_block but I simply can't see another way of doing this.
Essentially I have a symmetrical grid nested inside an asymmetrical grid and would like to repeat the same grid-span call for each of the three footer_block items but have failed to figure out how.
The Sass looks like:
.region--footer {
color: $color__background--dark;
border: {
top: 1px solid $base-ui-color;
}
font-family: $secondary-font-family;
font-size: $font-size-sm;
.content {
padding: {
bottom: em(32px, $font-size-sm);
top: em(32px, $font-size-sm);
}
@extend .cf;
@include add-grid(4 10 3);
@include add-gutter(1/4);
@include add-gutter-style('split');
}
}
.footer__blocks {
@extend .cf;
@include grid-span(1, 2);
@include layout(3, $gutter: 0) {
.footer__block {
@include grid-span(1, 1);
}
.footer__block.two {
@include grid-span(1, 2);
}
.footer__block.three {
@include grid-span(1, 3);
}
}
}
The HTML looks like:
<footer class="region--footer">
<div class="content">
<div class="footer__blocks">
<div class="footer__block one">
<img src="image.jpg">
</div>
<div class="footer__block two">
<img src="image.jpg">
</div>
<div class="footer__block three">
<img src="image.jpg">
</div>
</div>
</div>
</footer>
Thanks in advance