Skip to content

Instantly share code, notes, and snippets.

@pentzzsolt
Created May 12, 2016 12:45
Show Gist options
  • Select an option

  • Save pentzzsolt/35517598cf0ab7ef81c60f018bb501b0 to your computer and use it in GitHub Desktop.

Select an option

Save pentzzsolt/35517598cf0ab7ef81c60f018bb501b0 to your computer and use it in GitHub Desktop.
Example code for my non-destructive-map-merge Sass function.
$global-colors: (
neutral: #ccc,
success: green,
error: red
);
$local-colors: (
primary: (
base: #33c,
dark: #00a
),
neutral: (
base: #ccc,
dark: #999
)
);
$colors: some-different-map-merge($global-colors, $local-colors);
/* Expected $colors list after merging: */
$colors: (
primary: (
base: #33c,
dark: #00a
),
neutral: (
base: #ccc,
dark: #999
),
success: green,
error: red
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment