43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
{% set fwClass = classPrefix+'fw' %}
|
|
@font-face {
|
|
font-display: auto;
|
|
font-family: "{{ font.name }}";
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
src:
|
|
{%- for format in formats -%}
|
|
url("{{ font.name }}.{{ format.ext }}?v={{ font.version.string|urlencode }}") format("{{ format.name }}"){% if not loop.last %},{% endif %}
|
|
{%- endfor -%}
|
|
}
|
|
|
|
{% for id, icon in icons -%}
|
|
.{{ classPrefix }}{{ id }}::before{% if not loop.last %}, {% endif %}
|
|
{% endfor %} {
|
|
display: inline-block;
|
|
font-family: "{{ font.name }}";
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
font-variant: normal;
|
|
text-rendering: auto;
|
|
line-height: 1;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-font-smoothing: antialiased;
|
|
font-smoothing: antialiased;
|
|
}
|
|
|
|
.{{ fwClass }} {
|
|
text-align: center;
|
|
width: 1em;
|
|
}
|
|
|
|
{%- for id, icon in icons %}
|
|
.{{ classPrefix }}{{ id }}::before {
|
|
content: "\{{ icon.codepoint.toString(16) }}";
|
|
}
|
|
{%- if icon.width > font.em %}
|
|
.{{ fwClass }}.{{ classPrefix }}{{ id }}::before {
|
|
font-size: {{ font.em/icon.width }}em;
|
|
line-height: {{ icon.width/font.em }}em;
|
|
}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|