tc39 / ecmarkup

An HTML superset/Markdown subset source format for ECMAScript and related specifications
https://tc39.es/ecmarkup/
MIT License
222 stars 63 forks source link

Separate toolbox items into independently-wrappable "words" #554

Closed gibson042 closed 1 year ago

gibson042 commented 1 year ago

The current toolbox cannot wrap in between "Permalink" and "Pin" or "Pin" and "References (…)" (and thus can horizontally overflow the viewport when a definition is near the right margin), but can wrap in between "References" and "(…)" (splitting a link and on the second line intruding into what otherwise looks like box padding). This PR disables wrapping inside those links and inserts break opportunities in between them.

Before ![screenshot (before change)](https://github.com/tc39/ecmarkup/assets/1199584/6aecf505-9113-456e-a215-c06cd8607575)
After ![screenshot (after change)](https://github.com/tc39/ecmarkup/assets/1199584/62662fa6-4024-4247-b8db-038834dc2cf9)

The excess horizontal width is a known issue with CSS "shrink-wrapping" that already exists and is not changed by this PR:

current excessive width ![screenshot of current excessive width](https://github.com/tc39/ecmarkup/assets/1199584/8d8cc0a6-d95e-4660-867f-838749fa8d5c)
bakkot commented 1 year ago

Thanks!