Closed Bug 281645 Opened 20 years ago Closed 20 years ago

#sidebar-box line in pinstripe's sidebar.css is stripped by the preprocessor

Categories

(SeaMonkey :: Help Viewer, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sugar.waffle, Assigned: annevk)

References

()

Details

Attachments

(1 file, 1 obsolete file)

In sidebar.css of help.jar, there is no line of URL. Therefore, the following error messages come out in JavaScript Console when the debug option is made effective and help is opened. JavaScript Console message: Error: Expected identifier for pseudo-class or pseudo-element but found ' '. Ruleset ignored due to bad selector. Source File: chrome://help/skin/sidebar.css Line: 5 Perhaps, the following definitions might have been treated as a comment. #sidebar-box { If this is correct, the same problem might be brought up also in other places. Mac OS X 10.3.7 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050209 Firefox/1.0+
Summary: sidebar.css of help.jar is illegal. → sidebar.css of help.jar is illegal.
The winstripe version of the file uses a space before #sidebar-box: http://lxr.mozilla.org/seamonkey/source/toolkit/themes/winstripe/help/sidebar.css#46 But preprocessing css files is just a bad idea.
Status: UNCONFIRMED → NEW
Component: Help Documentation → Help Viewer
Ever confirmed: true
QA Contact: help-documentation → help
Summary: sidebar.css of help.jar is illegal. → #sidebar-box line in pinstripe's sidebar.css is stripped by the preprocessor
Would removing the space fix the problem?
No, you'd need to add a space in the pinstripe version of the file, so that the preprocessor doesn't treats that line as a comment. Just have a look at the license: the preprocessor removes all the lines starting with a "#". The winstripe file has got that space, so there's no problem on Win/Lin. But since css files may make use of the # sign, the real solution is to stop running css files through the preprocessor. You need to remove the "*" sign in the respective jar.mn (http://lxr.mozilla.org/mozilla/source/toolkit/themes/pinstripe/help/jar.mn), and convert the #-style comments to /* */ style.
Attached patch patch #1 (obsolete) — Splinter Review
Something like this? Who needs to review this?
Assignee: jwalden+fxhelp → bug
Status: NEW → ASSIGNED
Exactly! Request review from a toolkit peer: http://www.mozilla.org/owners.html#toolkit
Comment on attachment 174842 [details] [diff] [review] patch #1 I'd rather have one extra space than carry around four extra license headers in xulrunner chrome. Proportion is key here.
Attachment #174842 - Flags: review-
Actually, one of those files is already loaded including the license (help.css). Should that change? I also wonder why there is a different policy for CSS files here. (html.css, quirk.css, forms.css etc. all have this included normally.)
those aren't in toolkit, and only browser/toolkit/mail were using the preprocessor for a long time. Changing over existing files is a tricky issue, but we're more likely to convert towards stripping than away from it.
Attached patch patch #2Splinter Review
Here is a patch that does what you want and fixes this bug. It would be nice though if some consistency was used, since not all the files are using this kind of syntax in toolkit/themes. Shall I file a separate bug on that? (If so, who needs to be cc'ed?)
Attachment #174842 - Attachment is obsolete: true
Attachment #174993 - Flags: review?(mconnor)
Comment on attachment 174993 [details] [diff] [review] patch #2 well, like I said, its a tricky question. File the bug, cc me, and we'll fix it at some point. We really need to make a stricter rule as opposed to a general practice.
Attachment #174993 - Flags: review?(mconnor) → review+
Filed bug 283047. By the way, could someone check this in? I only have a CVS account for mozilla.org.
Attachment #174993 - Flags: superreview?(bryner)
Comment on attachment 174993 [details] [diff] [review] patch #2 /toolkit doesn't need SR
Attachment #174993 - Flags: superreview?(bryner)
checked in on trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: review-
Flags: review+
Product: Firefox → Toolkit
Version: Trunk → unspecified
Flags: in-testsuite-
Product: Toolkit → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: