tobogganSe connecter

library

Prebuilt pebble components: drop-in custom elements, no compiler needed

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Dernier runAucun
0Étoiles
0Forks
2Issues

The timeline's table view keeps whole words wherever they fit, and --start and --size are registered numbers

The second review found that 9eb18b1's fixed layout, which stopped wide
tables from scrolling the page, made the common case worse. The sample's
five columns broke words mid-word at 320 and 360px ("Standa|rd",
"Écim|age", "Fig.|2", a lone ")"), where the earlier auto layout had read
cleanly at 360.

The element now measures which of three layouts fits and marks the host
with it (data-table-fit). First comes an auto layout, where every column
is at least its longest word. Next, the same layout with the label column
hyphenated in the page's language and given all the room the others
leave. Last, the fixed layout, now hyphenating before it breaks anywhere.
A breakpoint can't make this choice: the widths are the page's words in
the page's font, and hyphenation depends on the browser. So the table is
still never wider than the element, and the sample's words stay whole
from 320px in English and 360px in French. At 320px the French labels
hyphenate: the longest word of each column takes 258 of the 288px, which
leaves 30px for paddings and the swatch, so whole words can't fit at
12px. Six and seven columns now keep whole words at 600 and 800px; under
about 400px they still fall back to the fixed layout, and the docs now
say how badly that reads. In the fixed layout under 30rem the swatch and
its gap shrink with a narrow column, so the swatch no longer spills into
the next column (24 vs 22px at 9 columns, 280px).

As the user asked, --start and --size are registered with @property
(<number>, inherits: false, initial 0). @property is ignored inside
@scope, so the registrations are a CSSStyleSheet of their own
(properties.css) that define() adopts unscoped. That makes them
page-wide: a page's own `--size: 2rem` computes to 0 once the bundle
loads (measured: 32px before, 0px after). The docs say so. A label reads
its segment's target width through --_target, because it no longer
inherits --size. left and width still transition, and reduced motion
still jumps.

The smoke now checks the sample in English and French at 280 to 1280px:
- no fallback layout and no word over two lines or wider than its cell
  at 320, 360 and 390 (French labels may hyphenate at 320);
- "Fig. 2" is never split;
- every swatch stays inside its cell (6, 7 and 9 columns);
- @property is registered: the rule is adopted, a segment's --size is a
  typed CSSUnitValue, and its label's --size is 0.
22 of these fail on 9eb18b1's bundle (TIMELINE_BUNDLE=… serves it).

Measured 12173 B gz (Δ floor 8153), budget 13500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 3 sem. · ea266d2624e34ccf4f043131a7e68499b4014252

Parents e1f9245

8 fichiers modifiés, 410 ajouts, 119 suppressions