Closed
Bug 321708
Opened 20 years ago
Closed 4 years ago
Don't inline CSS styles in print dialogs
Categories
(Core :: Printing: Output, defect)
Core
Printing: Output
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: vhaarr+bmo, Unassigned)
References
()
Details
(Keywords: good-first-bug)
Attachments
(1 file, 2 obsolete files)
12.33 KB,
patch
|
neil
:
superreview-
|
Details | Diff | Splinter Review |
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."
Reporter | ||
Comment 1•20 years ago
|
||
This is simply about eliminating most/some of the inline styles in
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpfe/global/resources/content/unix/printjoboptions.xul&rev=1.11&mark=143,147,151,155>
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpfe/global/resources/content/printdialog.xul&rev=1.10&mark=100,102,112>
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpfe/global/resources/content/printPageSetup.xul&rev=1.14&mark=113,122,129,130,132,133,134,136,142,151>
(and their toolkit counterparts), and move it to their respective CSS files.
Remember to fix all mozilla.org-themes.
Whiteboard: [good first bug]
Reporter | ||
Comment 2•20 years ago
|
||
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.
Updated•19 years ago
|
Status: NEW → ASSIGNED
Comment 3•19 years ago
|
||
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+
Comment 5•19 years ago
|
||
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)
Comment 7•19 years ago
|
||
(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 8•19 years ago
|
||
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 9•19 years ago
|
||
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)
Comment 10•18 years ago
|
||
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
Comment 11•16 years ago
|
||
Does this bug even apply anymore?
For example, mozilla/themes/modern/global/printing.css doesn't exist.
Comment 12•11 years ago
|
||
Hi, I want to fix this bug. can I get assigned to it?
Comment 13•11 years ago
|
||
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
Comment 14•11 years ago
|
||
Hi Mike, Yes I have set up my development enviroment.
Comment 15•11 years ago
|
||
Hi, I would like to work on this bug. I already built firefox on my computer.
Comment 16•11 years ago
|
||
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!
Comment 17•7 years ago
|
||
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!
Comment 18•7 years ago
|
||
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)
Comment 19•7 years ago
|
||
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.
Comment 20•6 years ago
|
||
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?
Comment 21•6 years ago
|
||
hi, i'd like to contribute to this bug?
Updated•5 years ago
|
Keywords: good-first-bug
Whiteboard: [good first bug]
Updated•4 years ago
|
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.
Description
•