Skip to content

Instantly share code, notes, and snippets.

@pepelsbey
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pepelsbey/4d0c4c862d1a3d976df1 to your computer and use it in GitHub Desktop.
Save pepelsbey/4d0c4c862d1a3d976df1 to your computer and use it in GitHub Desktop.
Scale
@each $scale in 1, 2, 4, 8 {
transform:scale(1);
margin:0 0 $gap $gap;
transform:scale(1 / 2);
margin:0 (- $width / 2) ($gap - $height / 2) $gap;
transform:scale(1 / 4);
margin:0 (- ($width / 2 + $width / 4)) ($gap - ($height / 2 + $height / 4)) $gap;
transform:scale(1 / 8);
margin:0 (- ($width / 2 + $width / 4 + $width / 8)) ($gap - ($height / 2 + $height / 4 + $height / 8)) $gap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment