ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Column width of the inline table in ApplyStringOrNumericBinaryOperator is slightly too narrow

Open nicolo-ribaudo opened this issue 4 months ago • 7 comments

Image

This is happening at all zoom levels, at least in Firefox: that first column is slightly too narrow so the t of opText wraps on a separate line.

nicolo-ribaudo avatar Aug 07 '25 20:08 nicolo-ribaudo

Probably a dupe of https://github.com/tc39/ecmarkup/issues/634? We don't have any column width set as far as I know.

Playing around with devtools, looks like it goes away if we remove the margin: 0 -4px on <var> elements, which is there so that the highlight color extends a little past the word (cc @michaelficarra).

bakkot avatar Aug 07 '25 21:08 bakkot

which is there so that the highlight color extends a little past the word

Technically that's what the 4px padding is for. The -4px margin is to account for that padding so it doesn't cause all vars to have 4px of additional inter-word spacing. Happy to do it another way if a CSS expert can help out.

michaelficarra avatar Aug 07 '25 21:08 michaelficarra

We could just disable that bit for <var>s which are direct children of a <td>, I guess? Not ideal but solves the immediate problem.

bakkot avatar Aug 07 '25 21:08 bakkot

Yeah that'd probably be fine, though the one in the OP is probably a <th>, so we'd also have to get those.

michaelficarra avatar Aug 07 '25 21:08 michaelficarra

Setting word-wrap: normal on that element also seems to fix it.

nicolo-ribaudo avatar Aug 07 '25 22:08 nicolo-ribaudo

Do you mean word-break: normal? Also, how is it not normal? That's supposed to be the default value if unset, and it doesn't look like we're setting it.

michaelficarra avatar Aug 07 '25 22:08 michaelficarra

word-wrap is an alias for overflow-wrap. We are setting word-wrap.

bakkot avatar Aug 07 '25 22:08 bakkot