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-86faeb62-1cc0-4f0c-81fe-728f1308ea78" 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-550af1ee-473b-40a3-bde2-da75ccedaa3b" 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-aaed7918-034c-4bbe-862e-e05b1eefe1b3" 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-800bd660-c753-47d8-8d2d-dd24c8dec52f" 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-26ec8c8b-b36b-4c82-9ec7-9d0285da506e" 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; }