Firefox adds extra ::before (containing padding and content) to a <dd> in <dl><div><dt></dt><dd></dd></div></dl>
Categories
(DevTools :: Inspector, defect)
Tracking
(firefox68 affected, firefox69 affected, firefox70 affected)
People
(Reporter: vardramat, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Create simple code:
<html>
<head>
</head>
<body>
<div>
<dl>
<div></div>
<dt>title</dt>
<dd>description</dd>
</div>
</dl>
</div>
</body>
</html>
Actual results:
FireFox tries to match the default style of <dd> element (40px margin left) by adding an unwanted ::before tag that has some content (possibly a "space") and 40px margin right.
It can be css reset with dd::before{ margin:0; content:""; }
Expected results:
There should be no ::before element created as of https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element
the code should be:
<html>
<head>
</head>
<body>
<div>
<dl>
<div>
<dt>title</dt>
<dd>description</dd>
</div>
</dl>
</div>
</body>
</html>
I have tested this using:
Windows10 64bit
Ubuntu 18.04 64bit
MacOS 10.13 64bit
I see the unwanted "::before" on all firefox versions and all Os
Load html attached
Control+Shift´+K
check Inspector
Release 68.0.1 Reproducible
Beta 69.0b11 Reproducible
Nightly 70.0a1 Reproducible
Comment 4•6 years ago
|
||
The priority flag is not set for this bug.
:gl, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 5•6 years ago
|
||
Changing the needinfo over to rcaliman since he said he was gonna look into this.
Comment 6•6 years ago
|
||
Good news, everyone! The bug has been fixed since last week.
It doesn't reproduce anymore with the latest Nightly.
Checking with mozregression indicated that the fix was in this range. Upon closer inspection, it seems the fix is from the patch for Bug 782551 targeting this issue specifically.
Here was the issue, a <dd> which didn't have a <dl> as a direct ancestor would get a ::before pseudo-element:
:not(dl) > dd:before {
display: inline;
white-space: pre;
font-size: 1px;
line-height: 0;
content: "\A ";
margin-inline-end: 40px;
}
Description
•