Skip to content

Commit

Permalink
added ellipsis on preview
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Aug 2, 2024
1 parent 83d3c60 commit 785a57e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 13 additions & 4 deletions src/bundle/Resources/public/scss/fieldType/preview/_ezkeyword.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@
padding-left: 0;
margin-bottom: 0;

.ibexa-keyword__item {
@include tag();
.ibexa-keyword {
&__item {
@include tag();

margin: 0 calculateRem(5px) 0 0;
padding: calculateRem(6px) calculateRem(8px);
max-width: 100%;
margin: 0 calculateRem(5px) 0 0;
padding: calculateRem(6px) calculateRem(8px);
}

&__item-content {
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@
{% set attr = attr|merge({'class': (attr.class|default('') ~ ' ibexa-field-preview ibexa-field-preview--ezkeyword')|trim}) %}
<ul {{ block( 'field_attributes' ) }}>
{% for keyword in field.value.values %}
<li class="ibexa-keyword__item">{{ keyword }}</li>
<li class="ibexa-keyword__item">
<span class="ibexa-keyword__item-content">
{{ keyword }}
</span>
</li>
{% endfor %}
</ul>
{% endif %}
Expand Down

0 comments on commit 785a57e

Please sign in to comment.