Skip to content

Instantly share code, notes, and snippets.

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

  • Save lozandier/0ed8336668289c1d0a9c to your computer and use it in GitHub Desktop.

Select an option

Save lozandier/0ed8336668289c1d0a9c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.4)
// ----
// Map from Imported JSON
$map: ( primaryColor: "red", secondaryColor: "blue" );
:root {
--x-foo-primary-color: map-get($map, 'primaryColor');
// Not the outcome you expect because of existing shorthand allowed by Sass for long property names based on one prefix
--common-properties: {
color: map-get($map, 'primaryColor');
background: map-get($map, 'secondaryColor')
}
}
x-foo {
color: var(--x-foo-primary-color);
// Apply crashes the compiler
//@apply(--common-properties)
}
:root {
--x-foo-primary-color: "red";
--common-properties-color: "red";
--common-properties-background: "blue";
}
x-foo {
color: var(--x-foo-primary-color);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment