Gerillass

v2.1.0

Reset Figure

Type: Mixin
@include reset-figure();

* You can call mixins with or without the gls- namespace (e.g. @include gls-reset-figure();).

The Reset Figure Sass mixin helps you reset the margin values of <figure> elements to 0 and make the <img> element inside them responsive (fluid). It does this by setting the width CSS property of the <img> element to 100%.

Examples

Simply call the mixin inside a selector that targets the <figure> element itself.

Sass
figure{
  @include reset-figure;
}
CSS
figure {
  margin: 0;
}
figure img {
  display: block;
  width: 100%;
}
Result