Wrong print style because :defined doesn't apply to the static clone.
Categories
(Core :: Printing: Output, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: 709922234, Assigned: emilio)
References
Details
Attachments
(5 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
- visit https://gem-book.js.org/en/guide/cli
- open Devtools > Inspector, enable "print media simulation"
- click menu File > Print
Actual results:
see screenshot
Expected results:
see screenshot
In particular, I don’t know why the background and text colors of the code block have changed, and the custom elements display undefined styles.
https://developer.mozilla.org/en-US/docs/Web/CSS/color-adjust
The background color is for this reason. I can set color-adjust: exact;
to solve.
But the printing style of custom elements I think is problematic
Assignee | ||
Comment 5•4 years ago
|
||
Fun:
:not(:defined)::before {
display: block;
content: 'The element is not defined';
padding: 1em;
border-radius: 4px;
text-align: center;
background: var(--border-color-sbqar);
}
Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D99632
Assignee | ||
Comment 8•4 years ago
|
||
With that, the print output is as expected. But note that that page still hits the slicing fallback because it seems <gem-book>
is a grid, and fragmenting a single column grid is borked (see bug 1417615).
You'd get even better print rendering with @media print { :host { display: block } }
in the <gem-book>
element.
Assignee | ||
Updated•4 years ago
|
Unbelievable, there are fixes so soon.
I have been using Firefox Nightly and I have not found a problem with the grid
. Thank you for your suggestion.
Comment 10•4 years ago
|
||
Comment 12•4 years ago
|
||
Backed out for failing print reftest animations-print.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/72ddac4860373e30a1815bf645a8782dfaf511d7
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
Reporter | ||
Comment 16•4 years ago
|
||
When printing the page as a .pdf
, the link cannot be clicked.
Does this need to be fixed?
Assignee | ||
Comment 17•4 years ago
|
||
That's bug 454059.
Description
•