Skip to content

Commit

Permalink
Add a comment explaining why we need the explicit height
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Nov 15, 2023
1 parent 4660474 commit d6a0305
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Resources/views/crud/field/country.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{% if show_flag and not show_name %}
{% for flag_code, country_name in field.formattedValue %}
{% if flag_code is not null %}
{# the explicit height is needed to avoid issues with SVG images in Safari browser #}
<img class="country-flag" height="17" alt="{{ country_name }}" title="{{ country_name }}" src="{{ asset('images/flags/' ~ flag_code ~ '.svg', ea.assets.defaultAssetPackageName) }}">
{% endif %}
{% endfor %}
Expand All @@ -19,6 +20,7 @@
<span>
{%- if show_flag -%}
{%- if flag_code is not null -%}
{# the explicit height is needed to avoid issues with SVG images in Safari browser #}
<img class="country-flag" height="17" alt="{{ country_name }}" title="{{ country_name }}" src="{{ asset('images/flags/' ~ flag_code ~ '.svg', ea.assets.defaultAssetPackageName) }}">
{%- endif -%}
{%- endif -%}
Expand Down

0 comments on commit d6a0305

Please sign in to comment.