The “flexible” media object.
In this variation of the flag object the image is placed to the left and the text to the right. In both variants both the image and the text goes full on small screens.
In this variation of the flag object the text is placed to the left and the image to the right. In both variants both the image and the text goes full on small screens.
In this variation of the flag object the image is placed to the left and the text to the right. In both variants both the image and the text goes full on small screens.
In this variation of the flag object the text is placed to the left and the image to the right. In both variants both the image and the text goes full on small screens.
In this variation of the flag object the image is placed to the left and the text to the right. In both variants both the image and the text goes full on small screens.
In this variation of the flag object the text is placed to the left and the image to the right. In both variants both the image and the text goes full on small screens.
<div class="flag">
<div class="flag__image">
<img src="/assets/img/examples/flag.jpg" alt="Flag object">
</div>
<div class="flag__body">
<h3>Image + text</h3>
<p>In this variation of the flag object the image is placed to the left and the text to the right. In both variants both the image and the text goes full on small screens.</p>
</div>
</div>
<div class="flag flag--rev">
<div class="flag__image">
<img src="/assets/img/examples/flag.jpg" alt="Flag object">
</div>
<div class="flag__body">
<h3>Text + image</h3>
<p>In this variation of the flag object the text is placed to the left and the image to the right. In both variants both the image and the text goes full on small screens.</p>
</div>
</div>
<div class="flag flag--top">
<div class="flag__image">
<img src="/assets/img/examples/flag.jpg" alt="Flag object">
</div>
<div class="flag__body">
<h3>Image + text aligned to top</h3>
<p>In this variation of the flag object the image is placed to the left and the text to the right. In both variants both the image and the text goes full on small screens.</p>
</div>
</div>
<div class="flag flag--rev flag--top">
<div class="flag__image">
<img src="/assets/img/examples/flag.jpg" alt="Flag object">
</div>
<div class="flag__body">
<h3>Text + image aligned to top</h3>
<p>In this variation of the flag object the text is placed to the left and the image to the right. In both variants both the image and the text goes full on small screens.</p>
</div>
</div>
<div class="flag flag--bottom">
<div class="flag__image">
<img src="/assets/img/examples/flag.jpg" alt="Flag object">
</div>
<div class="flag__body">
<h3>Image + text aligned to bottom</h3>
<p>In this variation of the flag object the image is placed to the left and the text to the right. In both variants both the image and the text goes full on small screens.</p>
</div>
</div>
<div class="flag flag--rev flag--bottom">
<div class="flag__image">
<img src="/assets/img/examples/flag.jpg" alt="Flag object">
</div>
<div class="flag__body">
<h3>Text + image aligned to bottom</h3>
<p>In this variation of the flag object the text is placed to the left and the image to the right. In both variants both the image and the text goes full on small screens.</p>
</div>
</div>
// Flag object
.flag {
@extend %module;
width: 100%;
display: table;
position: relative;
@include cf;
// Flag elements
&__body,
&__image {
display: table-cell;
vertical-align: middle;
}
&__body {
width: 50%;
padding-left: $grid-gutter / 2;
& *:last-child {
margin-bottom: 0;
}
}
&__image {
width: 50%;
padding-right: $grid-gutter / 2;
img {
display: block;
width: 100%;
max-width: none;
}
}
// Flag modifiers
&--rev {
direction: rtl;
.flag__body {
padding-left: 0;
padding-right: $grid-gutter / 2;
direction: ltr;
}
.flag__image {
padding-right: 0;
padding-left: $grid-gutter / 2;
direction: ltr;
}
}
&--top {
.flag__body,
.flag__image {
vertical-align: top;
}
}
&--bottom {
.flag__body,
.flag__image {
vertical-align: bottom;
}
}
// Flag object behavior on smaller devices
@include break(medium) {
display: block;
// Flag elements
&__body,
&__image,
&--rev &__body,
&--rev &__image {
width: 100%;
display: block;
float: left;
clear: both;
margin: 0;
padding: 0;
}
&__image,
&--rev &__image {
margin-bottom: $grid-gutter / 2;
}
}
}