Last active
August 29, 2015 14:26
-
-
Save shaunbent/38f0964fcb832c8df85a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
@function map-combine($source, $map) { | |
@each $key, $value in $map { | |
$new: ($key: $value); | |
@if map-has-key($source, $key) { | |
$current: map-get($source, $key); | |
$new: ($key: map-merge($current, $value)); | |
} | |
$source: map-merge($source, $new); | |
} | |
@return $source; | |
} | |
$map: ( | |
'pica' : ( | |
'group-a': ( | |
'font-size': 16px, | |
'line-height': 18px | |
), | |
'group-b': ( | |
'font-size': 18px, | |
'line-height': 20px | |
) | |
), | |
'pica-bold': ( | |
'group-a': ( | |
'font-weight': bold, | |
'letter-spacing': -1px | |
), | |
'group-c': ( | |
'letter-spacing': 0 | |
) | |
) | |
); | |
.pica { | |
content: inspect(map-get($map, 'pica')); | |
} | |
.pica-bold { | |
content: inspect(map-combine(map-get($map, 'pica'), map-get($map, 'pica-bold'))); | |
} |
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
.pica { | |
content: ("group-a": ("font-size": 16px, "line-height": 18px), "group-b": ("font-size": 18px, "line-height": 20px)); | |
} | |
.pica-bold { | |
content: ("group-a": ("font-size": 16px, "line-height": 18px, "font-weight": bold, "letter-spacing": -1px), "group-b": ("font-size": 18px, "line-height": 20px), "group-c": ("letter-spacing": 0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment