tc39 / ecmarkup

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

remove unnecessary break in SDOs reference pane header #601

Closed michaelficarra closed 3 months ago

michaelficarra commented 3 months ago

before:

image

after:

image

bakkot commented 3 months ago

I think this break is necessary for longer productions:

Screenshot 2024-06-17 at 7 37 45 AM
michaelficarra commented 3 months ago

Breaking doesn't prevent it from wrapping on a narrow-enough display. All it does is wrap unnecessarily on larger displays. We may be able to add some CSS to prefer breaking before the grammar alternative.

bakkot commented 3 months ago

The bit I posted above looks fine on my machine without this change, and terrible with this change. I grant that even prior to this change there are cases which look bad, but I don't think that warrants making other cases also bad just to avoid this linebreak in the case of short productions.

michaelficarra commented 3 months ago

Alternatively, we could just cut it off with an ellipsis when it doesn't fit:

image

bakkot commented 3 months ago

If you want to do that and also have the linebreak, I'm ok with it I guess. But I don't want to make things less readable than they currently are. The screenshot I posted looks fine; dropping the linebreak and adding an ellipsis would be worse.