Open Bug 1804854 Opened 3 years ago Updated 1 year ago

{inc} percent padding on orthogonal writing mode child expands when toggling details element

Categories

(Core :: Layout, defect)

Firefox 108
x86_64
macOS
defect

Tracking

()

People

(Reporter: cefqrn, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The height of the summary element in the following div is added to the padding of the details element every time the details element is toggled.

<div style="min-height:5rem;writing-mode:vertical-rl;background:orange;">
  <details style="padding-bottom:100%;writing-mode:horizontal-tb;width:500px;">
    <summary style="position:relative;height:5rem;cursor:pointer;background:gray;"></summary>
  </details>
</div>

Data URL: data:text/html,<div style="min-height:5rem;writing-mode:vertical-rl;background:orange;"><details style="padding-bottom:100%;writing-mode:horizontal-tb;width:500px;"><summary style="position:relative;height:5rem;cursor:pointer;background:gray;"></summary></details></div>

The problem can be reproduced using a new Firefox profile and is present in Firefox Nightly 109.0a1 (Build ID 20221208153054).

Component: General → Layout
Product: Firefox → Core

This should be reproducible without <details> as well fwiw.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: padding expands when toggling details element → percent padding on orthogonal writing mode child expands when toggling details element

The severity field is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)

For convenience: here's a live version of the testcase that the reporter provided.

(Note: there are some other bugs on file where we've got some unfortunate statefulness with orthogonal flow layout, where one reflow depends on the results of the previous layout [or collapses due to the lack-of-a-previous-layout]; though in most other bugs e.g. bug 1310551, it's scenarios where we get incorrect zero-size measurements on the first layout, rather than dynamically-growing sizes on subsequent relayouts.)

Blocks: writing-mode
Severity: -- → S3
Flags: needinfo?(jwatt)
Summary: percent padding on orthogonal writing mode child expands when toggling details element → {inc} percent padding on orthogonal writing mode child expands when toggling details element

Hello, I have run into a similar problem and was about to file a bug but I think it's all one and the same bug. The difference in my case is that the padding is defined in em, not %, but it seems to be the same underlying problem, as disabling the writing-mode property prevents the "growth" problem.

Should it be useful, I have created a test case here, where you can trigger the issue by repeatedly toggling off and on the line-height property of the .label styles: https://codepen.io/chriskirknielsen/pen/JjVBRbM

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: