Skip to content

Instantly share code, notes, and snippets.

View dmahipus's full-sized avatar

Dennis Adrian Mahipus dmahipus

  • Dubai, United Arab Emirates
View GitHub Profile
@dmahipus
dmahipus / README.md
Created August 22, 2019 06:12 — forked from jonathantneal/README.md
Fluid Aspect: A Sass mixin for creating intrinsic ratios

Fluid Aspect

fluid-aspect is a Sass mixin for creating intrinsic ratios in CSS. Intrinsic ratios allow elements to fill the width of their containing block and resize on the fly while maintaining their aspect ratio.

@include fluid-aspect($ratio, [$target]);
  • $ratio: An aspect ratio represented as two numbers separated by a space. Defaults to 1:1
  • $target: A selector targeting the element to be made fluid. Defaults to "> :first-child"