Skip to content

Instantly share code, notes, and snippets.

@astanush
Created June 4, 2013 21:36
Show Gist options
  • Select an option

  • Save astanush/5709816 to your computer and use it in GitHub Desktop.

Select an option

Save astanush/5709816 to your computer and use it in GitHub Desktop.

Revisions

  1. Aaron Stanush created this gist Jun 4, 2013.
    23 changes: 23 additions & 0 deletions _mixins.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    // Clearfix

    @mixin clearfix {
    *zoom: 1;
    &:before,
    &:after {
    display: table;
    content: "";
    }
    &:after {
    clear: both;
    }
    }

    // EM calculator: http://viljamis.com/blog/2013/prototyping-responsive-typography
    // Converts pixels to EMs
    // Example: font-size: em(16) --> font-size: 1em

    $browser-context: 16; // Default

    @function em($pixels, $context: $browser-context) {
    @return #{$pixels/$context}em
    }