Created
September 7, 2016 21:12
-
-
Save TorbenKoehn/949379ad59cb94348a7632cf9e1ae3b6 to your computer and use it in GitHub Desktop.
This snippet generates all Semantic UI colors for Text Colors. Use with class="[color] text", e.g. class="red text", class="violet text". Doesn't collide with other color classes.
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
@primaryColor : @pink; | |
@secondaryColor : @grey; | |
@red : #B03060; | |
@orange : #FE9A76; | |
@yellow : #FFD700; | |
@olive : #32CD32; | |
@green : #016936; | |
@teal : #008080; | |
@blue : #0E6EB8; | |
@violet : #EE82EE; | |
@purple : #B413EC; | |
@pink : #FF1493; | |
@brown : #A52A2A; | |
@grey : #A0A0A0; | |
@black : #000000; | |
@colors : red orange yellow olive green teal blue violet purple pink brown grey black; | |
.generate-text-colors(@i: 1) when (@i < length(@colors)) { | |
@item: extract(@colors, @i); | |
&[class*="@{item} text"] { | |
color: @@item; | |
} | |
.generate-text-colors(@i + 1); | |
} | |
.generate-text-colors(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment