Work Package Card: normalize priority label width

Cuts off after a certain threshold.

Using a fixed width leads to a more structured and calm visual design.
The price is that a bit of space is wasted for priorities with shorter
names.
This commit is contained in:
Tobias Dillmann
2026-06-12 12:49:57 +02:00
parent bee1f92245
commit 896e2c2754
2 changed files with 13 additions and 2 deletions
@@ -60,10 +60,10 @@ See COPYRIGHT and LICENSE files for more details.
<%= render(
Primer::Beta::Text.new(
tag: :span,
classes: "__hl_inline_priority_#{work_package.priority.id} __hl_inline__small_dot no-wrap"
classes: "op-work-package-card--priority __hl_inline_priority_#{work_package.priority.id} __hl_inline__small_dot no-wrap"
)
) do %>
<span class="op-work-package-card--priority-name"><%= work_package.priority.name %></span>
<span class="op-work-package-card--priority-name ml-1"><%= work_package.priority.name %></span>
<% end %>
<% end %>
@@ -38,6 +38,17 @@
margin-bottom: var(--base-size-4)
container-type: inline-size
.op-work-package-card--priority
display: inline-flex
align-items: center
&-name
display: inline-block
width: 90px
overflow: hidden
text-overflow: ellipsis
white-space: nowrap
&_with-footer
grid-template-rows: auto auto auto
grid-template-areas: "info_line actions" "subject subject" "footer footer"