x
1
2
3
4
5
6
7
<ol data-view-component="true" class="Truncate"> <li data-view-component="true" class="Truncate-text"> <span data-view-component="true" class="position-relative"><a id="truncate-link-primer" href="https://github.com" data-view-component="true" class="Link">primer</a> <tool-tip id="tooltip-08dedb82-82bb-478f-89ae-86aa662c437f" for="truncate-link-primer" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">primer</tool-tip></span></li> <li data-view-component="true" class="Truncate-text Truncate-text--primary"> <span data-view-component="true" class="position-relative"><a id="truncate-link-css" href="https://github.com" data-view-component="true" class="Link">/ css</a> <tool-tip id="tooltip-83be875e-30b6-4b9b-b9ed-98f1dd41342a" for="truncate-link-css" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">/ css</tool-tip></span></li> <li data-view-component="true" class="Truncate-text"> <span data-view-component="true" class="position-relative"><a id="truncate-link-issues" href="https://github.com" data-view-component="true" class="Link">/ Issues</a> <tool-tip id="tooltip-ce8bcf36-da27-4e0d-8d0b-5096b8bff140" for="truncate-link-issues" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">/ Issues</tool-tip></span></li> <li data-view-component="true" class="Truncate-text"> <span data-view-component="true" class="position-relative"><a id="truncate-link-number" href="https://github.com" data-view-component="true" class="Link">/ #123</a> <tool-tip id="tooltip-23aeeacf-76bc-443a-9a8f-57e87ab514cd" for="truncate-link-number" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">/ #123</tool-tip></span></li> <li data-view-component="true" class="Truncate-text Truncate-text--primary"> <span data-view-component="true" class="position-relative"><a id="truncate-link-title" href="https://github.com" data-view-component="true" class="Link">Visual bug on primer.style found in lists</a> <tool-tip id="tooltip-dc2e4424-5d31-4609-83e3-0de04c84209c" for="truncate-link-title" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">Visual bug on primer.style found in lists</tool-tip></span></li></ol>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<%= render(Primer::Beta::Truncate.new(tag: :ol)) do |component| %> <% component.with_item(tag: :li) do %> <%= render(Primer::Beta::Link.new(href: "https://github.com", id: "truncate-link-primer")) do |link| %> <% link.with_tooltip(text: "primer") %> primer <% end %> <% end %> <% component.with_item(tag: :li, priority: true) do %> <%= render(Primer::Beta::Link.new(href: "https://github.com", id: "truncate-link-css")) do |link| %> <% link.with_tooltip(text: "/ css") %> / css <% end %> <% end %> <% component.with_item(tag: :li) do %> <%= render(Primer::Beta::Link.new(href: "https://github.com", id: "truncate-link-issues")) do |link| %> <% link.with_tooltip(text: "/ Issues") %> / Issues <% end %> <% end %> <% component.with_item(tag: :li) do %> <%= render(Primer::Beta::Link.new(href: "https://github.com", id: "truncate-link-number")) do |link| %> <% link.with_tooltip(text: "/ #123") %> / #123 <% end %> <% end %> <% component.with_item(tag: :li, priority: true) do %> <%= render(Primer::Beta::Link.new(href: "https://github.com", id: "truncate-link-title")) do |link| %> <% link.with_tooltip(text: "Visual bug on primer.style found in lists") %> Visual bug on primer.style found in lists <% end %> <% end %><% end %>No notes provided.
No params configured.
app/components/primer/beta/truncate.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Truncate */.Truncate { display: inline-flex; min-width: 0; max-width: 100%;}.Truncate > .Truncate-text { min-width: 1ch; max-width: fit-content; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }:is(.Truncate > .Truncate-text) + .Truncate-text { /* stylelint-disable-next-line primer/spacing */ margin-left: var(--control-small-gap); }.Truncate-text--primary:is(.Truncate > .Truncate-text) { flex-basis: 200%; }.Truncate-text--expandable:is(.Truncate > .Truncate-text):hover,.Truncate-text--expandable:is(.Truncate > .Truncate-text):focus,.Truncate-text--expandable:is(.Truncate > .Truncate-text):active { max-width: 100% !important; flex-shrink: 0; cursor: pointer; }