Open Bug 801407 Opened 13 years ago Updated 3 years ago

PDF.js should be themeable.

Categories

(Firefox :: PDF Viewer, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: alfredkayser, Unassigned)

Details

(Keywords: ux-consistency, Whiteboard: [pdfjs-feature])

Attachments

(1 file, 3 obsolete files)

Currently, the toolbars and buttons of PDF.js cannot be themed, as they provide their own stylesheets outside chrome://*/skin/... This makes it impossible to style these toolbars and buttons in the same style as the rest of the browser for custom themes (such as Walnut and Nautipolis). Please, place the PDF.js stylesheets in chrome://pdfjs/skin/ so that we can style it. Thanks!
In short: move viewer.css and corr. images to chrome://pdf.js/skin/ and change the reference resource://pdf.js/web/viewer.css to chrome://pdf.js/skin/viewer.css.
Priority: -- → P3
Whiteboard: [pdfjs-c-feature]
Assignee: nobody → alfredkayser
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: Toolbar, buttons, sidebar of PDF.js should be themeable. → PDF.js should be themeable.
Status: NEW → ASSIGNED
Keywords: ux-consistency
Instead of moving default resource://pdf.js/web/viewer.css create empty/default one in chrome://pdfjs/skin/ . That will avoid code duplication for different skins and let authors to "extend" stylesheet vs creating new one. (btw, main repo is located at https://github.com/mozilla/pdf.js)
Attachment #716002 - Flags: feedback-
Note, this solution is also used in for example aboutMemory.css.
Attachment #716002 - Attachment is obsolete: true
Attachment #716996 - Flags: review?(ydelendik)
Attachment #716996 - Attachment is obsolete: true
Attachment #716996 - Flags: review?(ydelendik)
Attachment #717072 - Flags: review?(ydelendik)
Attachment #717072 - Attachment is obsolete: true
Attachment #717072 - Flags: review?(ydelendik)
Attachment #717077 - Flags: review?(ydelendik)
Comment on attachment 717077 [details] [diff] [review] V4: Oops wrong patch attacted, this is the right one Review of attachment 717077 [details] [diff] [review]: ----------------------------------------------------------------- The files you are modifying are automatically generated using https://github.com/mozilla/pdf.js/blob/master/make.js#L434 script. Please submit your changes to the mozilla/pdf.js repo first. ::: browser/extensions/pdfjs/content/web/viewer.html @@ +19,5 @@ > <meta charset="utf-8"> > <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> > <title>PDF.js viewer</title> > > + <!-- This snippet is used in firefox extension, see Makefile --> This code was automatically inserted by build script. Also, this change is irrelevant to the issue. @@ +27,2 @@ > > + <link rel="stylesheet" href="chrome://pdf.js/skin/viewer.css"/> The same. Keep it viewer.css ::: browser/extensions/pdfjs/extension-files @@ +36,5 @@ > content/web/images/toolbarButton-zoomOut.png > content/web/l10n.js > content/web/viewer.css > content/web/viewer.html > +skin/viewer.css Why you are removing viewer.js? This file is automatically generated ::: browser/extensions/pdfjs/skin/viewer.css @@ +1,1 @@ > +@import url("resource://pdf.js/web/viewer.css"); Please add additional <link> tag to the https://github.com/mozilla/pdf.js/blob/master/web/viewer-snippet-firefox-extension.html (which will be included to viewer.html) and don't use @import.
Attachment #717077 - Flags: review?(ydelendik) → review-
Any updates on this?
Actually, the theme can be decided through CSS. I was be able to change the PDF.JS theme by modifying the CSS. The thing we need is to allow CSS editing through special directory. If this is happen, my custom PDF.JS theme would be installed on Firefox.
(In reply to reinhart_previano from comment #9) > Actually, the theme can be decided through CSS. I was be able to change the > PDF.JS theme by modifying the CSS. The thing we need is to allow CSS editing > through special directory. If this is happen, my custom PDF.JS theme would > be installed on Firefox. See comment #1. As for comment #8: I get lost in the PDF.js repository on how to fix this. Aparently, in https://github.com/mozilla/pdf.js/blob/master/web/viewer.html one should replace viewer.css with something link chrome://pdfjs/skin/viewer.css, and package this viewer.css and images so that chrome://pdfjs/skin can find it.
Type: defect → enhancement
Severity: normal → --
Whiteboard: [pdfjs-c-feature] → [pdfjs-feature]

The bug assignee didn't login in Bugzilla in the last 7 months.
:bdahl, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: alfredkayser → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(bdahl)
Flags: needinfo?(bdahl)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: