This file contains 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
/** | |
* @subsection Get Sprites position in EM | |
* @author Marie Guillaumet | |
*/ | |
@mixin em-sprite-position($map, $sprite, $context: $fs, $offset-x: 0, $offset-y: 0) | |
{ | |
/** Thank you @pioupiouM! */ | |
$position: sprite-position($map, $sprite, $offset-x, $offset-x); | |
$x: nth($position, 1); |
This file contains 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
/** @subsection EM calculator */ | |
/** cf. https://gist.github.com/ijy/1441967 */ | |
@function em($target, $context: $base-font-size) | |
{ | |
@if $target == 0 { @return 0 } | |
@return 1em * $target / $context; | |
} | |
/** |
This file contains 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
/** @subsection EM calculator */ | |
/** cf. https://gist.github.com/ijy/1441967 */ | |
@function em($target, $context: $base-font-size) | |
{ | |
@if $target == 0 { @return 0 } | |
@return 1em * $target / $context; | |
} | |
/** |
This file contains 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
/** @subsection My Background Size Mixin */ | |
/** Pouvoir passer une taille en paramètre en fonction d'un font-size donné */ | |
@mixin my-background-size($width: $margin, $height: $margin, $font-size: $base-font-size) | |
{ | |
@include background-size( em($width,$font-size) em($height,$font-size) ); | |
} |