Open Bug 1762819 Opened 2 years ago Updated 2 years ago

{inc} CSS letter-spacing with display:inline causing unexpected space when scaling or modifying CSS in Firefox

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 98
defect

Tracking

()

Tracking Status
firefox-esr91 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- fix-optional

People

(Reporter: aldwis, Unassigned, NeedInfo)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

HTML:
<pre>11556650
44332210
55443320
55443320
11556650
44332210</pre>

CSS:
pre{
background: red;
letter-spacing: 1em;
display: inline;}

Tested on CodePen.io
run the code, and:
zoom with the browser zoom function
or try to modify CSS in the Inspector

Actual results:

on any zoom, a space added to the end of every line of the <pre>

The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout
Product: Firefox → Core
Component: Layout → Layout: Text and Fonts
Depends on: 299943
Attached file testcase 1

Here's the testcase, with a button added to make and remove a temporary style change (adjusting width on the pre element). This is sufficient to cause the unexpected layout-change noted in the bug report.

STR:

  1. Load this testcase.
  2. Click the button.

EXPECTED RESULTS:
No change; each line should still be the same length, just as in the initial rendering of the page.

ACTUAL RESULTS:
The first and second line (i.e. all but the last line) get a bit longer, as shown by the background-color.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

Note: in older Firefox builds (e.g. Nightly 2015-01-01), the initial rendering matches what I describe in ACTUAL RESULTS; and clicking the button doesn't have any effect.

(In reply to Daniel Holbert [:dholbert] from comment #4)

Note: in older Firefox builds (e.g. Nightly 2015-01-01), the initial rendering matches what I describe in ACTUAL RESULTS; and clicking the button doesn't have any effect.

Looks like we switched from this to our current "unstable" behavior in bug 1643126.

(Pushlog for the behavior-change is https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=63dc5e9b1b02b0aebd6badfe5eaef7bb9aa8f430&tochange=7f7b983390650cbc7d736e92fd3e1f629a30ac02 in which this looks like the most-likely candidate.)

So, the fact that our behavior here is "unstable" (unexpectedly changing on relayout/zoom) is a regression from bug 1643126. Marking as-such.

Keywords: regression
Regressed by: 1643126
Summary: CSS letter-spacing with display:inline causing unexpected space when scaling or modifying CSS in Firefox → {inc} CSS letter-spacing with display:inline causing unexpected space when scaling or modifying CSS in Firefox

Set release status flags based on info from the regressing bug 1643126

:jfkthame, since you are the author of the regressor, bug 1643126, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jfkthame)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: