Created
April 23, 2015 21:51
-
-
Save nixstrom/01f93590916ef8aa1df8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
$color-primary: #ff0; | |
$color-secondary: #00f; | |
$color-tertiary: #000; | |
// Mixin to colorize a property according to user level (set as class on body) | |
@mixin theme($attr, $tint: "", $amount: "") { | |
@if $tint != "" { | |
#{$attr}: lighten(#000000, $amount); | |
} else { | |
#{$attr}: $color-primary; | |
.CWN & { | |
#{$attr}: $color-secondary; | |
} | |
.service.aftale & { | |
#{$attr}: $color-tertiary; | |
} | |
} | |
} | |
.button-primary { | |
@include theme(background); | |
&:hover, | |
&:active, | |
&:focus { | |
@include theme(background, lighten, 90%); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button-primary else { | |
background: #ff0; | |
} | |
.CWN .button-primary else { | |
background: #00f; | |
} | |
.service.aftale .button-primary else { | |
background: #000; | |
} | |
.button-primary:hover, .button-primary:active, .button-primary:focus { | |
background: #e6e6e6; | |
} | |
.button-primary:hover else, .button-primary:active else, .button-primary:focus else { | |
background: #ff0; | |
} | |
.CWN .button-primary:hover else, .CWN .button-primary:active else, .CWN .button-primary:focus else { | |
background: #00f; | |
} | |
.service.aftale .button-primary:hover else, .service.aftale .button-primary:active else, .service.aftale .button-primary:focus else { | |
background: #000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment