New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 630909 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Compat



Sign in to add a comment

Anchors with viewport-based font sizes and transitions applied ignore font-size changes in print stylesheets

Reported by vinc...@bigsweaterdesign.com, Jul 25 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36

Example URL:
https://jsfiddle.net/bigsweater/tz932Lqa/3/

Steps to reproduce the problem:
1. Visit the JSFiddle above
2. Click the 'Print' button in the HTML pane to trigger the Print dialog
3. See incorrectly-sized anchors in the PDF print-preview

What is the expected behavior?
Since I've set an explicit print style to reset the font size to 9pt, I expect anchors to be the same size as their surrounding text.

What went wrong?
Anchors that have both viewport-based font sizes and transitions print at the incorrect size, even if the transitions and font sizes are removed or reset in a print stylesheet.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 52.0.2743.82  Channel: stable
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

Disabling the transitions or switching to a static font-size removes the issue. (Try commenting out the outermost transition property in the Fiddle above, and then hit the Print button---the issue disappears.)
 
Apologies: I forgot to reduce the amount of HTML in the test. Here's the updated Fiddle:

https://jsfiddle.net/bigsweater/tz932Lqa/4/

Cc: msrchandra@chromium.org
Labels: Needs-Feedback
@vincent -- Thank you for the report.
Clicking print in the html opens print preview and there is the difference in the fonts.
I am attaching the screenshot of the print preview. Could you please confirm the issue
630909.jpg
157 KB View Download

Comment 3 by b...@chromium.org, Jul 25 2016

Components: Internals>Printing
@mschandra --- Yep, that's the issue. Thank you!
If you set these styles on the main stylesheet, does everything work as expected?  This bug is specifically that print stylesheets are not respected, not that font-size styles are broken across the board, right?
@rohitrao --- Correct. It's specifically print stylesheets, and oddly, it's specific to anchors. As far as I've been able to tell, the issue doesn't affect any other element, but I could have missed some.

FWIW, it seems to me as though the anchors' font-size property continues to increase based on viewport width, even if the viewport is a @page. The static font size from the print stylesheet is never applied.
Labels: -Needs-Feedback
Status: Untriaged (was: Unconfirmed)
Cc: nainar@chromium.org timloh@chromium.org

Comment 9 by nainar@chromium.org, Aug 23 2016

Cc: alancutter@chromium.org
Components: Blink>Animation
Status: WontFix (was: Untriaged)
Can confirm that this issue is not restricted to a tag elements, as I tested it with b too here: https://jsfiddle.net/tz932Lqa/8/

Also can confirm that this is the correct behaviour the font specified for html in media print makes all elements have a uniform font throughout. We also match Firefox on this behaviour. 
Cc: esprehn@chromium.org thestig@chromium.org ranjitkan@chromium.org nyerramilli@chromium.org
 Issue 636240  has been merged into this issue.

Sign in to add a comment