| 1 |
// Bourbon's essentials mixins |
| 2 |
$em-base: 16px !default; |
| 3 |
// Strip units |
| 4 |
@function strip-units($value) { |
| 5 |
@return ($value / ($value * 0 + 1)); |
| 6 |
} |
| 7 |
// PX to EM |
| 8 |
@function em($pxval, $base: $em-base) { |
| 9 |
@if not unitless($pxval) { |
| 10 |
$pxval: strip-units($pxval); |
| 11 |
} |
| 12 |
@if not unitless($base) { |
| 13 |
$base: strip-units($base); |
| 14 |
} |
| 15 |
@return ($pxval / $base) * 1em; |
| 16 |
} |
| 17 |
//Breakpoints |
| 18 |
$breakpoints: ( |
| 19 |
xsm: em(480), |
| 20 |
sm: em(768), |
| 21 |
md: em(1024), |
| 22 |
lg: em(1260), |
| 23 |
xlg: em(1440) |
| 24 |
); |
| 25 |
|
| 26 |
@mixin breakpoints($breakpoint) { |
| 27 |
@media screen and (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { |
| 28 |
@content; |
| 29 |
} |
| 30 |
} |
| 31 |
// Hover Active Focus pseudo selector mixin |
| 32 |
@mixin hover { |
| 33 |
&:hover, &:active, &:focus { |
| 34 |
@content; |
| 35 |
} |
| 36 |
} |
| 37 |
// Smooth text |
| 38 |
@mixin smoothText { |
| 39 |
-webkit-font-smoothing: antialiased; |
| 40 |
-moz-osx-font-smoothing: grayscale; |
| 41 |
} |