Closed
Bug 45567
Opened 24 years ago
Closed 24 years ago
separate user stylesheets for chrome and document
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
FIXED
People
(Reporter: fantasai.bugs, Assigned: hyatt)
Details
Request to separate user stylesheet for chrome and external document. <BLOCKQUOTE cite="news:3957E177.993BAC60@escape.com"> <!-- fantasai. "Re: user stylesheet". June 26, 2000. n.p.m.style --> On a related slant, there should be two user.css files--one for the chrome, and one for the document(s) being viewed. The latter would correspond to the user stylesheet defined in CSS2:6.4, and like the document loaded into Mozilla, nothing in this file may directly access the chrome. (Similarly, the file for the chrome should not be able to directly access any elements on the loaded document.) This not only gives the stylesheet writer the freedom to apply the global selector to documents, but also makes the user stylesheet more accessible and easier to use; the writer does not need to worry about affecting the chrome, and thus anyone who can write a stylesheet for an HTML file can edit their own user stylesheet for Mozilla. </BLOCKQUOTE>
Comment 1•24 years ago
|
||
I think this is a good idea, although it might be difficult. Marking confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•24 years ago
|
QA Contact: chrisd → py8ieh=bugzilla
Assignee | ||
Comment 2•24 years ago
|
||
I just fixed this in 43220... didn't notice there was a separate bug. Pierre, I'm taking this and resolving it as fixed. I assume that's ok, since I followed your directions (to split the files into userChrome.css and userContent.css) over in 43220.
Assignee: pierre → hyatt
Assignee | ||
Comment 3•24 years ago
|
||
fixed when i checked in stuff under 43220.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
The userContent stylesheet is still allowed to style scrollbars with *. Otherwise, I'm quite impressed. :) Testcase: add "* {background-color: red}" to userContent.css and open up the URL in bug 21890. [OT] BTW, I just opened up bug 21890's testcase in a May build--as noted, the textarea scrollbars weren't styled. They /were/ styled in a July build. Rather curious, if y'ask me.
Comment 5•24 years ago
|
||
Technically speaking, userContent stylesheets _are_ allowed to style anonymous scrollbars that are around the content, because technically speaking those scrollbars are children of a content node. So that's not actually a bug. Anyway, it's a userstylesheet, so anything goes in that respect. ;-)
Keywords: vtrunk
> Technically speaking, userContent stylesheets _are_ allowed to style > anonymous scrollbars that are around the content, because technically > speaking those scrollbars are children of a content node. And technically speaking, one shouldn't have fixed bug 21890? After all, the scrollbars are children of a content node, and the author has control of the content. > So that's not actually a bug. All right, then I'll feature-request that this behavior be changed so I can put * {background-color: white !important} in my stylesheet without coloring the scrollbars. >:)
Comment 7•24 years ago
|
||
You have to make the distinction between "explicit content" and XBL "anonymous content", and even further, the distinction between anonymous content and walled off anonymous content. The scrollbars are walled off anonymous content. Author styles should not affect those. User stylesheets are made godlike, and can therefore style everything. To colour only part of the content, i.e., the explicit content but not the walled off anonymous content (which might include author generated stuff, btw, which is why user style is made godlike with respect to it) you would have to edit your skin's scrollbar stylesheet and add in some !important marks.
Assignee | ||
Comment 8•24 years ago
|
||
Hixie, do you think we should add a "applyuserstyles" bool as well to XBL to enable us to turn off user sheets?
Comment 9•24 years ago
|
||
No. That would allow authors to bind the HTML element and import styles on that, thus taking full control of the document's cascade. That is an absolute must not happen.
Assignee | ||
Comment 10•24 years ago
|
||
Ok, I don't claim to understand completely, but I'll take your word for it. :)
Comment 11•24 years ago
|
||
I've been using this sucessfully for a while now. VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•