Created
June 12, 2012 19:34
-
-
Save Jaswetz/2919647 to your computer and use it in GitHub Desktop.
SCSS: mixins.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------------------------------------------- | |
// mixins.scss | |
//---------------------------------------------------------------------------- | |
// --------------------------------------------------------------------------- | |
// CONVERTING PX TO EM | |
@function calc-em($target-px, $context) { | |
@return ($target-px / $context) * 1em; | |
} | |
@mixin font-size($font-size: 16){ | |
font-size : #{$font-size}px; | |
font-size : #{$font-size / 10}rem; } | |
@mixin text-overflow() { | |
overflow : hidden; | |
text-overflow : ellipsis; | |
white-space : nowrap; } | |
// gradients | |
@mixin greygrad { | |
@include vertical($white, darken($greyLighter, 5%)); } | |
@mixin basegrad { | |
@include vertical($baseColor, darken($baseColor, 10%)); } | |
@mixin infograd { | |
@include vertical($infoColor, darken($infoColor, 10%)); } | |
@mixin inversegrad { | |
@include vertical($inversColor, darken($inversColor, 10%)); } | |
@mixin successgrad { | |
@include vertical($successColor, darken($successColor, 10%)); } | |
@mixin warninggrad { | |
@include vertical($warningColor, darken($warningColor, 10%)); } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment