Remove uses of inline-styles

This commit is contained in:
Ryan Ahearn
2023-03-07 17:15:31 -05:00
parent 2a6bc62003
commit 73a3511ef2
11 changed files with 50 additions and 18 deletions

View File

@@ -183,8 +183,19 @@
id=None
) %}
{% call field(align='right') %}
<style nonce="{{ csp_nonce() }}">
{% if id %}
#{{id}} .spark-bar-bar {
width: {{ count / max_count * 100 }}%;
}
{% else %}
.spark-bar-bar {
width: 100%;
}
{% endif %}
</style>
<span {% if id %}id="{{ id }}"{% endif %} class="spark-bar">
<span class="spark-bar-bar" style="width: {{ count / max_count * 100 }}%">
<span class="spark-bar-bar">
{{ '{:,.0f}'.format(count) }}
</span>
</span>