Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add map of icons #11

Closed
sveetch opened this issue Jul 18, 2019 · 0 comments
Closed

Add map of icons #11

sveetch opened this issue Jul 18, 2019 · 0 comments

Comments

@sveetch
Copy link
Owner

sveetch commented Jul 18, 2019

Change template for something like:

{% for icon_name,icon_values in icons.items %}${{ icon_values.class_name }}: "{{ icon_values.utf8 }}";
{% endfor %}

$icons: (
    {% for icon_name,icon_values in icons.items %}{{ icon_values.class_name }}: ${{ icon_values.class_name }},
    {% endfor %}
);

@mixin include-icons(){
    @each $name, $value in $icons {
        .#{% templatetag openbrace %}$name{% templatetag closebrace %}::before {
            content: "#{% templatetag openbrace %}$value{% templatetag closebrace %}";
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant