Last active
August 29, 2015 14:10
-
-
Save Kcko/ac042b3c32eb191e2a0d to your computer and use it in GitHub Desktop.
Hračka - ukázka theme - vygenerování struktury
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
<section class="theme-green"> | |
<div class="a">A</div> | |
<div class="b">B</div> | |
</section> | |
<section class="theme-red"> | |
<div class="a">A</div> | |
<div class="b">B</div> | |
</section> |
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.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin theme ($theme: 'green', $map: ()) | |
{ | |
div.a | |
{ | |
color: map-get($map, colorPrimary); | |
border: 1px solid; | |
padding: 5px; | |
} | |
div.b | |
{ | |
color: map-get($map, colorSecondary); | |
border: 1px solid; | |
padding: 5px; | |
background: lighten(map-get($map, colorSecondary), 20); | |
} | |
} | |
.theme-green | |
{ | |
@include theme('green', (colorPrimary: green, colorSecondary: #80ff00)); | |
} | |
.theme-red | |
{ | |
@include theme('red', (colorPrimary: red, colorSecondary: #bf0000)); | |
} | |
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
.theme-green div.a { | |
color: green; | |
border: 1px solid; | |
padding: 5px; | |
} | |
.theme-green div.b { | |
color: #80ff00; | |
border: 1px solid; | |
padding: 5px; | |
background: #b3ff66; | |
} | |
.theme-red div.a { | |
color: red; | |
border: 1px solid; | |
padding: 5px; | |
} | |
.theme-red div.b { | |
color: #bf0000; | |
border: 1px solid; | |
padding: 5px; | |
background: #ff2626; | |
} |
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
<section class="theme-green"> | |
<div class="a">A</div> | |
<div class="b">B</div> | |
</section> | |
<section class="theme-red"> | |
<div class="a">A</div> | |
<div class="b">B</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment