Skip to content

Instantly share code, notes, and snippets.

@hamlim
Last active May 22, 2017 18:19
Show Gist options
  • Save hamlim/7927a2ddc7c80f19ac530ee0c8589f02 to your computer and use it in GitHub Desktop.
Save hamlim/7927a2ddc7c80f19ac530ee0c8589f02 to your computer and use it in GitHub Desktop.
Shared Variable File in Sass
@mixin FeatureComponentA() {
.FeatureComponentA {
color: $Feature-color;
border-radius: $Feature-radius;
}
}
@mixin FeatureComponentB() {
.FeatureComponentB {
color: $Feature-color;
height: $Feature-height; // this is specific so might not be in the shared variables
}
}
@import 'partialA';
@import 'feature_variables';
@include FeatureComponentA();
@import 'partialB';
@import 'feature_variables';
@include FeatureComponentB();
$Feature-color: blue;
$Feature-radius: 5px;
$Feature-height: 5rem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment