Open
Bug 62838
Opened 23 years ago
Updated 8 months ago
quirk.css does not override forms.css
Categories
(Core :: Layout: Form Controls, defect, P3)
Core
Layout: Form Controls
Tracking
()
NEW
mozilla1.0.1
People
(Reporter: neil, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file)
267 bytes,
text/html
|
Details |
quirk.css has several styles to set the border of input[type=image] Unfortunately they only work if you manually add !important, because forms.css styles input[type=image] with no border, and for some reason this is overriding quirk.css which I assume it shouldn't. While you're looking at this, I suggest you show the focus for image inputs with no border using -moz-outline, i.e. input[type=image][border=0]:focus { -moz-outline: 1px dotted WindowText; } Note that if you decide to add this to forms.css (because inputs without quirks have no border by default) you would have to override this in quirk.css for images with a border, i.e. input[type=image]:focus { border-style: dotted; -moz-outline: 0px; }
Reporter | ||
Comment 1•23 years ago
|
||
Updated•23 years ago
|
Assignee: rods → hyatt
Comment 2•23 years ago
|
||
The problem is that forms.css is loaded AFTER quirk.css, so from the CSS cascade perspective, it is correct that the ruls in forms.css will override rules in quirk.css. However, since the rules in forms.css were once in html.css, which is loaded before quirk.css, this represents a regression. Namely, that rules in quirk.css which used to override rules that are now in forms.css no longer override them. Since Hyatt moved the rules from html.css to forms.css I'm assigning this bug to him. I only see two ways to fix it really: 1) make the rules in quirk.css more specific, either with !important or by adding to the selector specificity, or 2) @import the forms.css file from ua.css before the @import of quirks.css - which won't allow the logic that is currently used to distinguish between xbl-forms.css and forms.css. There is no real problem, as far as I am concerned, with using !important in quirk.css, but it will impact the ability of authors to override those rules, so it must be considered carefully. BTW: was the migration of the rules to form.css reviewed by pierre or rods? I must admit that I was not aware of this change until now...
Comment 3•23 years ago
|
||
I'm happy to solve this any way you like. Let me know what approach you'd most like to see. If you want me to just revert us back to the way things were, I can do that too.
Comment 4•23 years ago
|
||
IMHO we should really fix this by putting the @import _into_ the ua.css file and using DOM-style tricks to enable/disable the stylesheets just like we do with the quirk stylesheet. How does that sound?
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9 → mozilla0.9.1
Updated•22 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Comment 8•22 years ago
|
||
Doesn't look like this is getting fixed before the freeze tomorrow night. Pushing out a milestone. Please correct if I'm mistaken.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Comment 9•22 years ago
|
||
It is a bit related to bug 43220. Marking dependency.
Depends on: 43220
Target Milestone: mozilla0.9.4 → mozilla1.0
Updated•22 years ago
|
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 10•22 years ago
|
||
Various rearragnements to our UA CSS seem to have gotten this working. Resolving WORKSFORME.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 11•22 years ago
|
||
No, this is still a problem. To observe: 1. Notice that the last image in the test case has no border 2. Notice that tabbing to the first image in the test case shows an outline, quirk.css says it should change the border style to dotted.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
![]() |
||
Comment 12•21 years ago
|
||
is this still a problem? If so, could you point to the exact rules in forms.css and quirks.css that are not interacting in the right way?
Reporter | ||
Comment 13•21 years ago
|
||
Basically the rules at lines 39-54 of quirk.css: /* Quirk: input images have a blue border (b=28010) */ /* default border */ input[type=image] { border: 2px solid blue; } /* border when focused -- only change style to dotted */ input[type=image]:focused { border-style: dotted; } /* border when focused -- only change color to gray */ input[type=image][disabled] { border-color: GrayText; } are ignored because the rule at line 271 of forms.css: input[type="image"] { ... border: none; ... } is overriding them.
![]() |
||
Comment 14•21 years ago
|
||
Comment 2 basically describes the problem: at the moment, forms.css is _not_ imported from ua.css or html.css. It's loaded via the chrome registry's GetAgentSheets method and is inserted into the style set in DocumentViewerImpl::CreateStyleSet. This method does the following: GetAgentSheets(); append them to the agent list in the style set one by one; append ua.css to the list; Unfortunately, style sets store sheets in order from most important to least important, so this puts forms.css (and things like the scrollbar sheet) "later" in the cascade than ua.css. This may even be correct for the scrollbar sheet, but is definitely wrong for forms.css We have a few options: 1) Change the order of sheets in the document viewer (this will also make html.css override forms.css, so it may not be such a great option). 2) Insert the forms sheet into the ua sheet by hand instead of inserting it into the style set by hand (and put it right before quirk.css). 3) Implement XBL form controls, lose the old forms.css, and import the xbl one from ua.css in the proper place in the cascade (after html.css, before quirk.css). I like option 3, myself... ;)
OS: Windows 95 → All
Hardware: PC → All
Updated•21 years ago
|
QA Contact: vladimire → tpreston
Updated•19 years ago
|
Assignee: hyatt → nobody
Status: REOPENED → NEW
QA Contact: tpreston → layout.form-controls
Updated•8 months ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•