Skip to content

Instantly share code, notes, and snippets.

@jdsteinbach
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save jdsteinbach/c984de32ed9304c895dc to your computer and use it in GitHub Desktop.

Select an option

Save jdsteinbach/c984de32ed9304c895dc to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="container">
<div class="primary-content">
Primary Content
</div>
<div class="secondary-content">
Secondary Content
</div>
</div>
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
/// Prints a map and its properties
/// @param {Map} $map
/// @requires {function} map-depth
@mixin debug-map($map) {
@debug-map {
$keys: map-keys($map);
@each $key in $keys {
$value: map-get($map, $key);
#{"(" + type-of($value) + ") " + $key}: $value;
}
}
}
$map-orig: (
color: blue,
size: large,
weight: heavy,
price: 30,
shipping: 0
);
$map-new: (
color: red,
size: large,
weight: light,
shipping: 5,
tax: 3,
quantity: 1
);
$map-merged: map-merge($map-orig, $map-new);
@include debug-map($map-merged);
@debug-map {
(color) color: red;
(string) size: large;
(string) weight: light;
(number) price: 30;
(number) shipping: 5;
(number) tax: 3;
(number) quantity: 1;
}
<div class="container">
<div class="primary-content">
Primary Content
</div>
<div class="secondary-content">
Secondary Content
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment