Skip to content

Instantly share code, notes, and snippets.

@kdo
Created June 27, 2017 00:57
Show Gist options
  • Save kdo/5ae55ee6468c6703274d388e887f7f08 to your computer and use it in GitHub Desktop.
Save kdo/5ae55ee6468c6703274d388e887f7f08 to your computer and use it in GitHub Desktop.
Color variables example
.site-header {
background-color: $color-header-background;
a {
color: $color-header-link;
&:hover {
color: $color-header-link-hover;
}
}
}
// Assigning color hex values to variables
// Avoid using those variables in partials
$blue: #366e81;
$orange: #de8e35;
$dark-orange: #91320d;
$cyan: #00a0b0;
$green: #37a68e;
$red: #ff1744;
$white: #ffffff;
$black: #000000;
$dark-gray: #666666;
$medium-gray: #999999;
$light-gray: #cccccc;
$lighter-gray: #dddddd;
$lightest-gray: #f2f2f2;
$almost-white: #f9f9f9;
// Assigning colors to variables to use in partials
$color-default-text: $black;
$color-subtle-text: $dark-gray;
$color-disabled-text: $medium-gray;
$color-error-text: $red;
$color-default-border: $lighter-gray;
$color-active-border: $blue;
$color-header-background: $orange;
$color-header-link: $white;
$color-header-link-hover: $dark-orange;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment