Closed Bug 321708 Opened 20 years ago Closed 4 years ago

Don't inline CSS styles in print dialogs

Categories

(Core :: Printing: Output, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: vhaarr+bmo, Unassigned)

References

()

Details

(Keywords: good-first-bug)

Attachments

(1 file, 2 obsolete files)

From bug 277296 comment 14, timeless said: "+ <label style="visibility: hidden;" value="&marginLeft.label;"/> + <box style="border: 1px; + border-style: dashed; + border-color: gray;" + flex="1"/> i'm not particularly fond of inline style, i wonder if these should have ids to make it easier for other things to poke."
AFAIK, you would add the CSS styles to these files: http://lxr.mozilla.org/mozilla/find?string=printing.css And you'd also need to add the following stylesheet to printjoboptions.xul and printdialog.xul: <?xml-stylesheet href="chrome://global/skin/printing.css" type="text/css"?> I think that would be OK - timeless would know better.
Status: NEW → ASSIGNED
Attachment #235885 - Flags: review?(timeless)
Comment on attachment 235885 [details] [diff] [review] Move inline styles to printing.css > This invisible label (with same content as the visible one!) is used to ensure that the <textbox> is centered above the page. The same technique is deployed for the bottom/left/right input fields, below. Adding an id is good, but please also add a class since the rule is going to be the same in general for all of them class="hiddenspacing" or something >+ <label id="marginTopLabel" value="&marginTop.label;"/> this means that average themes would use a single css rule .hiddenspacing {visibility:hidden}, but if some strange instance wanted to do something else per id'd node, it could.
Attachment #235885 - Flags: review?(timeless) → review+
In this revised patch, I've addressed the issues raised in comment #4, by adding a hiddenspacing class to the four elements, and also adding their CSS rules to the printing.css files.
Assignee: vhaarr+bmo → ehsan.akhgari
Attachment #235885 - Attachment is obsolete: true
Attachment #236611 - Flags: review?(timeless)
Comment on attachment 236611 [details] [diff] [review] Move inline styles to printing.css (revised) >Index: themes/classic/global/printing.css i was hoping that this: >+#fromPageInput, #toPageInput, #numCopiesInput, #topInput, #bottomInput, #leftInput, #rightInput { could have been replaced with a class :( >+ width: 5em; >+} and similarly: >+#marginRightLabel, #marginBottomLabel { >+ visibility: hidden; >+} with this: >+.hiddenspacing { >+ visibility: hidden; >+} >Index: xpfe/global/resources/content/printPageSetup.xul :(
Attachment #236611 - Flags: superreview?(neil)
(In reply to comment #6) > (From update of attachment 236611 [details] [diff] [review] [edit]) > >Index: themes/classic/global/printing.css > i was hoping that this: > >+#fromPageInput, #toPageInput, #numCopiesInput, #topInput, #bottomInput, #leftInput, #rightInput { > > could have been replaced with a class :( > >+ width: 5em; > >+} > > and similarly: > >+#marginRightLabel, #marginBottomLabel { > >+ visibility: hidden; > >+} > > with this: > >+.hiddenspacing { > >+ visibility: hidden; > >+} > > >Index: xpfe/global/resources/content/printPageSetup.xul > > :( > Done.
Attachment #236611 - Attachment is obsolete: true
Attachment #238884 - Flags: superreview?(neil)
Attachment #238884 - Flags: review?(timeless)
Attachment #236611 - Flags: superreview?(neil)
Attachment #236611 - Flags: review?(timeless)
Comment on attachment 238884 [details] [diff] [review] Move inline styles to printing.css (revised again) >+#marginPage { >+ height: 29.7mm; >+} >+ >+#marginTop { >+ height: 0.05in; >+} >+ >+#marginLeft { >+ width: 0.025in; >+} These values are all overridden by inline style created by the preview generator. There's no point setting them here. >+#marginCenter { >+ border: 1px; >+ border-style: dashed; >+ border-color: gray; >+} The background of the preview box is, unfortunately, still set in code... >+#marginRight { >+ width: 0.025in; >+} >+ >+#marginBottom { >+ height: 0.05in; >+} As per page/top/left. >- <textbox id="topInput" size="5" >+ <textbox id="topInput" size="5" class="margin-input-box" size="5" != style="width: 5em;" In fact those textboxes using a width should use a size but unfortunately I don't have a build with a unix print dialog to verify what size to use.
Attachment #238884 - Flags: superreview?(neil) → superreview-
Comment on attachment 238884 [details] [diff] [review] Move inline styles to printing.css (revised again) >+ border-color: gray; And since we're printing on paper do we want a white background or should we use the system background colour (and therefore border colour)?
Attachment #238884 - Flags: review?(timeless)
Leaving this for those new to mozilla as a good first bug. I've passed that stage... :-)
Assignee: ehsan.akhgari → nobody
Status: ASSIGNED → NEW
QA Contact: printing
Does this bug even apply anymore? For example, mozilla/themes/modern/global/printing.css doesn't exist.
Hi, I want to fix this bug. can I get assigned to it?
Hi, MD. Al-Amin - We can do that - have you set up your development environment, as per here? https://developer.mozilla.org/en-US/docs/Simple_Firefox_build
Hi Mike, Yes I have set up my development enviroment.
Hi, I would like to work on this bug. I already built firefox on my computer.
We generally assign bugs to new contributors after their first patch is submitted. Please give it a try, and let us know if you have any questions!
Hello everyone! This is Preeti and I have just recently started contributing to open source. Could someone please guide me on how to proceed on this bug? Thanks in advance!
Hi folks, I would like to work on this as my first contribution! Do you guys know how I should approach this?
Flags: needinfo?(mhoye)
Hi, folks; Can you email me directly? I'd like to help you get set up to get started, but in-bug isn't the right place for that.

Hi, I'm a new contributor and would like to take on this bug? Can I proceed? or is anyone else still working on it?

hi, i'd like to contribute to this bug?

Keywords: good-first-bug
Whiteboard: [good first bug]
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(mhoye)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: