.added_size {
border-width: 2px;
border-style: solid;
padding: 2px;
color: grey;
}
div.grid-view-item__sizes {
margin-top: 5px;
}
{% assign prefix = 'UK' %}
{% assign sizes = '' %}
{% for tag in product.tags %}
{% if tag contains prefix %}
{% assign sizes = sizes | append: tag | append: '||' %}
{% endif %}
{% endfor %}
{% if sizes %}
<div class="grid-view-item__sizes">
{% assign sizes = sizes | split: '||' %}
{% for size in sizes %}
<span class="added_size">{{ size }}</span>
{% endfor %}
</div>
{% endif %}