Skip to content

Instantly share code, notes, and snippets.

@yodasw16
Last active August 29, 2015 14:17
Show Gist options
  • Save yodasw16/2da877a861f0b2ca2f28 to your computer and use it in GitHub Desktop.
Save yodasw16/2da877a861f0b2ca2f28 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$namespace: null !default;
$#{$namespace}variable: value;
// Want output like:
// $namespaced-variable: value;
// Reasoning:
// I'm building a scss/css framework
// and started realizing that variable
// names like $base-font-size might
// cause conflicts for people.
// I could just namespace all of my
// variables, but I personally hate
// namespacing in my own stuff so I
// want it to be optional. Would like
// a $namespace variable that is set
// to null !default
// If someone wants a namespace on
// all the variables, they just change
// that variable to a real value and
// everything has a namespace now.
// You can see a similar approach to
// namespacing selectors here:
// https://github.com/ScalesCSS/base-forms/blob/master/_forms.scss
// line 12 and line 41
// If I can do this with maps, I'm
// missing how.
Invalid CSS after "$": expected identifier, was "#{$namespace}va..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment