Unexpected blank space after open-paren in "(view change)" links, on Confluence wiki "all updates" page (with ::first-letter { text-transform: ...} styling, using uppercase or capitalize
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
Details
Attachments
(5 files)
STR with original site (with mozilla-internal confluence instance):
(1) View https://mana.mozilla.org/wiki/#all-updates
(2) Look at the various updated 18 minutes ago (view change)
statements next to updates.
ACTUAL RESULTS:
There's some weird-looking blank space between the (
and the word view
-- like 3-4 character-widths of blank space.
EXPECTED RESULTS:
No such blank space
I'll attach a reduced testcase which demonstrates this, too.
I see this in Nightly 87.0a1 (2021-02-07), as well as Nightly 2020-01-01 (from over a year ago), on my MacBook Pro. So: not a recent regression.
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Comment 2•3 years ago
|
||
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
Here's a frame dump. It shows that we think the div
(the inline-block) is 15381
app units wide, and we correctly place the subsequent span ("view change)" is placed at that x-value.
I think that 15381 is too large, though? It doesn't look like 'any of the div's contents occupy that much width.
Reporter | ||
Comment 4•3 years ago
|
||
So the div here has text-transform:uppercase
(and the bug happens with capitalize
value as well). That is highly relevant.
It looks like we are improperly computing the width of the div
as if the whole div had the text-transform
styling (instead of just the first letter). If I edit the testcase to actually use that text-transform
styling for the whole div, then the span remains in exactly the same place, and the div's textual content expands precisely the right amount to exactly eat up the unexpected space & to reach the span.
Reporter | ||
Comment 5•3 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
It looks like we are improperly computing the width of the
div
as if the whole div had thetext-transform
styling
Here's a variant of the original testcase, to visualize this.
This variant renders correctly, and it places the "view change" text at exactly the same x-position as where "testcase 1" places it. Here, there's no weird blank space before that text, because the div's chunk of text is wider (due to being entirely uppercase).
So: when we render testcase 1, I think we're confused about how much of the text is getting the text-transform
applied to it.
Comment 6•3 years ago
|
||
This is bug 385615.
Description
•