Closed Bug 1417569 Opened 7 years ago Closed 6 years ago

@media print rule does not work in WebExtension css files

Categories

(WebExtensions :: General, defect, P5)

58 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1448507

People

(Reporter: onyshchuk, Unassigned)

Details

Attachments

(1 file)

1.27 KB, application/x-zip-compressed
Details
Attached file media-print-test.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20171115100050

Steps to reproduce:

See simple WebExtension in attachment.

Content script creates on every page 
<div class="test">This div must be invisible on print and print preview</div> 

Class "test" from injected media-print-test.css:
.test { /*Big red text in red border*/ }
@media print {
	.test { display: none; }
}

Load WebExtension as temporary addon.


Actual results:

On google.com we can see div with red border. Go to print preview. There is no border, but text is present.



Expected results:

Div "test" must be invisible on print preview.

P.S. Do not test this addon on Mozilla sites by reason of bug 1310082
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Priority: -- → P5
Product: Toolkit → WebExtensions
Duplicate of bug 1448507. This was filed first, so normally I'd dup in the other direction, but the other bug now has info on what is causing this written up there.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: