Skip to content

Instantly share code, notes, and snippets.

@pepelsbey
Created July 17, 2014 23:14
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/0ab9777c4531518b9a5b to your computer and use it in GitHub Desktop.
Save pepelsbey/0ab9777c4531518b9a5b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
$ratio:16/10;
$width:1024px;
$height:$width/$ratio;
$gap:100px;
$ratio:2;
div {
float:left;
margin:0 (0 - $width*(1 - 1/$ratio)) ($gap - $height*(1 - 1/$ratio)) $gap;
width:$width;
height:$height;
background:#069;
transform-origin:0 0;
transform:scale(1 / $ratio);
}
div {
float: left;
margin: 0 -512px -220px 100px;
width: 1024px;
height: 640px;
background: #069;
transform-origin: 0 0;
transform: scale(0.5);
}
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment