Skip to content

Instantly share code, notes, and snippets.

@erin-dot-io
Created March 27, 2013 20:38
Show Gist options
  • Select an option

  • Save erin-dot-io/5257813 to your computer and use it in GitHub Desktop.

Select an option

Save erin-dot-io/5257813 to your computer and use it in GitHub Desktop.

Revisions

  1. erin-dot-io created this gist Mar 27, 2013.
    17 changes: 17 additions & 0 deletions pixel-parity-rems.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // the mixin

    @mixin font-size($size: 16) {
    font-size: ($size) + px;
    font-size: ($size / 16) + rem;
    }

    // example

    h6 { @include font-size(11); }

    // will compile to

    h6 {
    font-size: 11px;
    font-size: 0.6875rem;
    }