Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ----
- // libsass (v3.3.2)
- // ----
- $small : 400px;
- $medium: 600px;
- $bigscreen: 800px;
- $kicker-font: (
- font-family : Arial,
- font-weight : 900,
- color : black,
- size-map : (
- null : 12px,
- $small : 15px,
- $medium : (16px, 1.3)
- ),
- fallback-size-map : (
- null : 14px,
- $small : 16px,
- $bigscreen : (18px, 2)
- )
- );
- @mixin getFont($font-map) {
- @if map-has-key($font-map, font-family) {
- font-family : map-get($font-map, font-family);
- }
- @if map-has-key($font-map, font-weight) {
- font-weight : map-get($font-map, font-weight);
- }
- @if map-has-key($font-map, color) {
- color : map-get($font-map, color);
- }
- @if map-has-key($font-map, size-map) {
- $fs-map : map-get($font-map, size-map);
- @each $breakpoint, $size-props in $fs-map {
- @if $breakpoint == null {
- @include makeFontSize($size-props);
- }
- @else {
- @media screen and (min-width: $breakpoint) {
- @include makeFontSize($size-props);
- }
- }
- }
- }
- @if map_has_key($font-map, fallback-size-map) {
- $fbs-map : map-get($font-map, fallback-size-map);
- @each $breakpoint, $size-props in $fbs-map {
- @if $breakpoint == null {
- @include makeFallbackFontSize($size-props);
- }
- @else {
- @media screen and (min-width: $breakpoint) {
- @include makeFallbackFontSize($size-props);
- }
- }
- }
- }
- }
- @mixin makeFontSize($size-props) {
- @if type-of($size-props) == "list" {
- .fonts-loaded & {
- font-size: nth($size-props, 1);
- }
- @if (length($size-props) > 1) {
- .fonts-loaded & {
- line-height: nth($size-props, 2);
- }
- }
- }
- @else {
- .fonts-loaded & {
- font-size: $size-props;
- }
- }
- }
- @mixin makeFallbackFontSize($size-props) {
- @if type-of($size-props) == "list" {
- font-size: nth($size-props, 1);
- @if (length($size-props) > 1) {
- line-height: nth($size-props, 2);
- }
- }
- @else {
- font-size: $size-props;
- }
- }
- .kicker{
- @include getFont($kicker-font);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement