Skip to content

Instantly share code, notes, and snippets.

@metamn
Created May 15, 2015 16:07
Show Gist options
  • Save metamn/ebdf8f2bf940705ea89d to your computer and use it in GitHub Desktop.
Save metamn/ebdf8f2bf940705ea89d to your computer and use it in GitHub Desktop.
Colors SWIG
{% for color in colors %}
// {{ color.description }}
${{ color.name }}: {{ color.value }};
{% endfor %}
// Color combinations. Colors are not used standalone but in pairs
@mixin colors($name) {
{% for pair in color_pairs %}
@if ($name == '{{ pair.name }}') {
{% for property in pair.properties %}{{ property.name }}: {{ property.value }};
{% endfor %}
}
{% endfor %}
}
// Color classes
{% for color in colors %}
.{{ color.name }} {
background: {{ color.value }};
};
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment