Reset Figure
Type:
Mixin
@include
reset-figure();
* You can call mixins with or without
gls-
namespace (e.g. @include gls-reset-figure();
).Reset Figure Sass mixin helps you to reset the margin values of
<figure>
elements to 0
and make the <img>
element responsive (fluid) in it, that is it sets the width CSS property of the <img>
element to 100%
.Examples
Simply call the mixin in a selector that targets the <figure>
element itself.
figure{
@include reset-figure;
}
//CSS Output
figure {
margin: 0;
}
figure img {
display: block;
width: 100%;
}