Closed
Bug 1483499
Opened 5 years ago
Closed 5 years ago
<legend> not child of <fieldset> should have 2px padding
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: zcorpan, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
WebKit/Chromium/EdgeHTML always have 2px padding. For Gecko html.css says `fieldset > legend` instead of just `legend`. See https://github.com/whatwg/html/issues/2729 Test: http://web-platform-tests.live/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html
Assignee | ||
Comment 1•5 years ago
|
||
Simon makes a reasonably compelling argument -- the current "fieldset >" qualifier means that we get different amounts of padding depending on whether the legend is inside of "display:contents" or not. Kind of a strained scenario to design for, but there's some logic to the idea that there should be consistency there -- and given that plus the consensus of other browsers, it seems reasonable to change here.
Assignee | ||
Updated•5 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•5 years ago
|
||
Here's a testcase with the display:contents scenario: https://jsfiddle.net/xmcpsozh/ If you view that in Firefox and look closely [or use devtools to inspect computed style], you can see that the display:contents-nested legend has less padding than the normal legend.
Assignee | ||
Comment 3•5 years ago
|
||
Mihir might take this -- tentatively assigning this to him. All we need to do here is: (1) Merge this all into a single "legend { ... }" rule (no fieldset > legend): https://dxr.mozilla.org/mozilla-central/rev/4e56a2f51ad739ca52046723448f3129a58f1666/layout/style/res/forms.css#58-66 (2) Write a reftest based on my jsfiddle from comment 2, with a display:contents wrapper around <legend> in the testcase and without it in the reference case.
Assignee: nobody → miyer
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•5 years ago
|
||
I'll go ahead and close this out. Note that I'll be leaving behind one "fieldset > legend" declaration here -- that one's covered by bug 1485502.
Assignee: iyermihir → dholbert
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Try run w/ reftests, all platforms (to validate that new tests pass everywhere & to catch possible changes in number of fuzzy pixels on platform-specific fuzzy annotations): https://treeherder.mozilla.org/#/jobs?repo=try&revision=c739c00aa6d36384cfa2bf66b1c048b242853c88 Try run w/ all layout-relevant tests, linux-only (to catch any other test dependencies on old behavior): https://treeherder.mozilla.org/#/jobs?repo=try&revision=4b47c71fd59f319dd46a2d897c8b366a3cb5668f
Assignee | ||
Comment 7•5 years ago
|
||
Hmm, looks like I've got some test expectations to update.
Comment 8•5 years ago
|
||
Comment on attachment 9003318 [details] Bug 1483499: Give <legend> consistent default padding, regardless of whether it's a child of fieldset. r=mats Mats Palmgren (:mats) has approved the revision.
Attachment #9003318 -
Flags: review+
Assignee | ||
Comment 9•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0344ccf32f2808a61fc997f6dbf4880d50283393&selectedJob=195827965
Comment 10•5 years ago
|
||
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fc18abb2ea52 Give <legend> consistent default padding, regardless of whether it's a child of fieldset. r=mats
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12682 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 13•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fc18abb2ea52
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Upstream PR merged
You need to log in
before you can comment on or make changes to this bug.
Description
•