<figure> vary width when apply certain styles
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
People
(Reporter: ortiz, Unassigned)
Details
Attachments
(1 file)
|
462.49 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
(Firefox Developer Edition – 85.0b6)
<figure> actual dimensions: 1360x0
First, apply the following style for <figure>:
figure { display: none }
Then, apply the following @media rule and style for <figure>:
@media (min-width: 1000px) { figure { display: initial } }
Actual results:
Now, <figure> apparently has dimensions of 0x16.
Expected results:
Should return 1360x0 instead of 0x16.
It's necessary to put figure { display: block } inside @media rule to see 1360x0 again, although initial value is semantically more correct.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
No, display: initial is always just display: inline. You want display: revert, which accounts for user-agent stylesheets.
Description
•