Skip to content

Instantly share code, notes, and snippets.

@blackfalcon
Created August 10, 2013 20:05
Show Gist options
  • Select an option

  • Save blackfalcon/6201936 to your computer and use it in GitHub Desktop.

Select an option

Save blackfalcon/6201936 to your computer and use it in GitHub Desktop.

Revisions

  1. blackfalcon revised this gist Aug 12, 2013. 2 changed files with 1 addition and 23 deletions.
    8 changes: 0 additions & 8 deletions SassMeister-output.css
    Original file line number Diff line number Diff line change
    @@ -1,8 +0,0 @@
    div {
    width: 40%;
    height: 20%;
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    }
    16 changes: 1 addition & 15 deletions absolute-h-and-v.sass
    Original file line number Diff line number Diff line change
    @@ -14,18 +14,4 @@
    top: 0
    left: 0
    bottom: 0
    right: 0

    div
    width: 40%
    height: 20%
    left: 50%
    top: 50%
    position: absolute
    transform: translate(-50%, -50%)






    right: 0
  2. blackfalcon revised this gist Aug 11, 2013. 2 changed files with 23 additions and 1 deletion.
    8 changes: 8 additions & 0 deletions SassMeister-output.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    div {
    width: 40%;
    height: 20%;
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    }
    16 changes: 15 additions & 1 deletion absolute-h-and-v.sass
    Original file line number Diff line number Diff line change
    @@ -14,4 +14,18 @@
    top: 0
    left: 0
    bottom: 0
    right: 0
    right: 0

    div
    width: 40%
    height: 20%
    left: 50%
    top: 50%
    position: absolute
    transform: translate(-50%, -50%)






  3. blackfalcon revised this gist Aug 10, 2013. 2 changed files with 1 addition and 14 deletions.
    10 changes: 0 additions & 10 deletions SassMeister-output.css
    Original file line number Diff line number Diff line change
    @@ -1,10 +0,0 @@
    .block {
    width: 500px;
    height: 500px;
    margin: auto;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    }
    5 changes: 1 addition & 4 deletions absolute-h-and-v.sass
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,4 @@
    top: 0
    left: 0
    bottom: 0
    right: 0

    .block
    +absolute-center(500px, 500px)
    right: 0
  4. blackfalcon revised this gist Aug 10, 2013. 2 changed files with 22 additions and 1 deletion.
    10 changes: 10 additions & 0 deletions SassMeister-output.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    .block {
    width: 500px;
    height: 500px;
    margin: auto;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    }
    13 changes: 12 additions & 1 deletion absolute-h-and-v.sass
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    // ----
    // Sass (v3.2.10)
    // Compass (v0.13.alpha.4)
    // ----
    // http://coding.smashingmagazine.com/2013/08/09/absolute-horizontal-vertical-centering-css/
    =absolute-center($width, $height)
    width: $width
    height: $height
    @@ -6,4 +14,7 @@
    top: 0
    left: 0
    bottom: 0
    right: 0
    right: 0

    .block
    +absolute-center(500px, 500px)
  5. blackfalcon created this gist Aug 10, 2013.
    9 changes: 9 additions & 0 deletions absolute-h-and-v.sass
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    =absolute-center($width, $height)
    width: $width
    height: $height
    margin: auto
    position: absolute
    top: 0
    left: 0
    bottom: 0
    right: 0