Last active
August 29, 2015 14:05
-
-
Save BuddyLReno/4ba52931ba2f463ae64a to your computer and use it in GitHub Desktop.
Theming with Sass
This file contains 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
<article class="EventPass theme--ljl"> | |
<a href="#">test</a> | |
<p>test</p> | |
</article> |
This file contains 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.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
//colors | |
$default-primary: #000; | |
$default-secondary: #c8c7c7; | |
$ljl-primary: #e3a536; | |
$ljl-secondary: #3abce0; | |
//elements | |
@mixin color-theme( | |
$copy: $default-primary, | |
$background: $default-secondary | |
) { | |
%theme-copy { | |
color: $copy; | |
} | |
%theme-background { | |
background-color: $background; | |
} | |
} | |
//themes | |
.EventPass.theme--ljl { | |
@include color-theme($copy: $ljl-primary, $background: $ljl-secondary); | |
} | |
a { | |
@extend %theme-copy; | |
} | |
p { | |
@extend %theme-background; | |
} |
This file contains 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
.EventPass.theme--ljl a { | |
color: #e3a536; | |
} | |
.EventPass.theme--ljl p { | |
background-color: #3abce0; | |
} |
This file contains 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
<article class="EventPass theme--ljl"> | |
<a href="#">test</a> | |
<p>test</p> | |
</article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment