Simplify styles in TopLevelVideoDocument.css
Categories
(Core :: Layout: Images, Video, and HTML Frames, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(2 files)
Bug 1763495 part 1: Remove some unnecessary styles in TopLevelVideoDocument.css. r?#layout-reviewers
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
In bug 1739691, I noticed that TopLevelVideoDocument.css has some styles that can be simplified, I think.
In particular: we don't need to bother setting any styles at all on body
, and we don't need to bother setting margin
/padding
on the root element.
I'm pretty sure we can make this simplification without having any user-visible impact, but I'm spinning it off to its own bug patch just to be on the safe side in case it somehow does have an effect.
Assignee | ||
Comment 1•2 years ago
|
||
As indicated in the new code-comment, we do need the html element to be the
full height of the viewport. But:
- we don't need to set width to 100%. The default, 'auto', has the same effect.
- we don't need to set margin/padding to 0; they default to 0 on 'html'.
- we don't need to set anything on the body, since it doesn't render or have
any children in the box tree. (The video descendant is abspos and hence uses
the viewport as its containing block, not the body.)
As an extra check that this is reasonable, note that the similar
TopLevelImageDocument.css stylesheet doesn't have any CSS rules that target the
html or body elements.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
This doesn't change behavior; it just makes the existing CSS a bit more concise.
('inset' is a shorthand that sets top, right, bottom, and left all at once.)
Depends on D143099
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3311357f2912 part 1: Remove some unnecessary styles in TopLevelVideoDocument.css. r=hsivonen,emilio https://hg.mozilla.org/integration/autoland/rev/ec092287f6b4 part 2: Use 'inset' shorthand in TopLevelImageDocument.css and TopLevelVideoDocument.css. r=emilio
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3311357f2912
https://hg.mozilla.org/mozilla-central/rev/ec092287f6b4
Description
•