Closed
Bug 394063
Opened 17 years ago
Closed 16 years ago
Consider continuing to force <select>s to Aqua
Categories
(Camino Graveyard :: HTML Form Controls, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino2.0
People
(Reporter: stuart.morgan+bugzilla, Assigned: alqahira)
Details
Attachments
(3 files)
2.83 KB,
text/html
|
Details | |
2.56 KB,
text/plain
|
Details | |
20.97 KB,
patch
|
chris
:
review+
stuart.morgan+bugzilla
:
superreview+
|
Details | Diff | Splinter Review |
Styled selects will now fall back to gfx when styled, which look really, really bad in a way that gfx buttons and text fields do not. We could do a forms.css override/fork where we !important a bunch of rules to keep selects unstyled and Aqua-looking.
![]() |
||
Comment 1•17 years ago
|
||
Adding this ruleblock would do the job:
select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
-moz-appearance: menulist !important;
border-color: ThreeDFace !important;
background-color: -moz-Field !important;
color: -moz-FieldText !important;
font: -moz-list !important;
border-width: 2px !important;
border-style: inset !important;
}
This leaves listboxes ([size="5" or [multiple]) untouched.
and to my immense personal pleasure, that even works from within userContent.css :-)
![]() |
||
Comment 2•17 years ago
|
||
a somewhat ugly text case.
Assignee | ||
Comment 3•17 years ago
|
||
The selects on http://www.freep.com are a good example of barely-styled selects that end up looking horribly out-of-place with the gfx button.
Since this works from userContent, it sounds like we could ship another agent stylesheet (like we do for ad-blocking and flashblock) that we load all the time, which might be less fragile than forking forms.css. OTOH, adding another sheet might increase pageload time.
![]() |
||
Comment 4•17 years ago
|
||
I don't think the extra sheet, by itself, would affect page load time; after all the browser doesn't need to fetch it. But it might affect painting time on pages with complex forms.
And I agree, not forking forms.css is the safer option.
My code sample above isn't complete, BTW. It misses a ruleblock for [disabled] widgets.
And it should not contain the rule for 'font'. That prevents the user from resizing the text-label (via minimum font-size or text-resize).
Here is what I have in my usercontent.css:
select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
-moz-appearance: menulist !important;
border-color: ThreeDFace !important;
background: -moz-Field !important;
color: -moz-FieldText !important;
border-width: 2px !important;
border-style: inset !important;
}
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
-moz-appearance: menulist !important;
background: ThreeDFace !important;
color: GrayText !important;
}
I haven't seen any issues so far.
Reporter | ||
Comment 5•17 years ago
|
||
Will a css override still work in light of bug 240117?
![]() |
||
Comment 6•17 years ago
|
||
Yes, it still works.
My 3 hours old home made build has all the patches from bug 240117 (I did pay attention during checkout). With my rules above, select widgets are _not_ sensitive to author styling.
Just verified with the latest Tinderbox build: 2007100917 (2.0a1pre).
![]() |
||
Comment 7•17 years ago
|
||
Bz has since somehow confirmed that this should work (see bug 240117 comment 18 and 19).
On the other hand, there may be a safer method by using the CSS3 'initial' keyword (fully implemented in Gecko 1.9 with the -moz prefix). Works equally well with the select widget in my testing.
select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
-moz-appearance: menulist !important;
border-color: -moz-initial !important;
background: -moz-initial !important;
color: -moz-FieldText !important;
border-width: -moz-initial !important;
border-style: -moz-initial !important;
}
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
-moz-appearance: menulist !important;
background:-moz-initial !important;
color:-moz-initial !important;
}
Assignee | ||
Comment 8•17 years ago
|
||
Another testcase are the selects at the bottom of http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=849&start=15 which seem to have a 2px border that forces them into ugly-land (which is pretty standard in phpBB2-land.
phpBB3 standard themes http://www.phpbb.com/community/viewforum.php?f=49 use 1px border and 1 px padding, which looks even worse in gfx, IMO.
Safari 3 renders the former as standard Aqua, even.
Reporter | ||
Comment 9•17 years ago
|
||
I've been seeing a fair number of ghetto-looking selects, so we should definitely do this until widget has fancier support for selects.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Camino2.0
Reporter | ||
Updated•17 years ago
|
Assignee: stuart.morgan → nobody
Assignee | ||
Comment 10•17 years ago
|
||
The select on https://xmedia.ex.ac.uk/user/login/ is another powerful reason to do this (just focus it).
Reporter | ||
Updated•17 years ago
|
Flags: camino2.0a1?
Reporter | ||
Comment 11•16 years ago
|
||
Missed a1.
I'm now used to this enough that I no longer have a strong opinion either way.
Flags: camino2.0b1?
Flags: camino2.0a1?
Flags: camino2.0a1-
Assignee | ||
Comment 12•16 years ago
|
||
We should be able to more-or-less copy the ad-blocking/Flashblock stylesheet loading code to do this, so it might be something that, say, Chris could do.
Doesn't need to block b2 unless we're adding some sort of *visible* pref (which I don't think we should do), but really, really want for 2.0.
Flags: camino2.0b2?
Flags: camino2.0b1?
Flags: camino2.0b1-
Comment 13•16 years ago
|
||
Just to be clear: a "forceAqua.css" file that has the contents of comment 7, loaded via the usual stylesheet service, will solve this bug?
I can do the code if someone else can do the CSS.
![]() |
||
Comment 14•16 years ago
|
||
(In reply to comment #13)
> I can do the code if someone else can do the CSS.
I'll post the stylesheet soonish.
![]() |
||
Comment 15•16 years ago
|
||
I've added back the font part (when I originally tested this, that prevented minimum font-size from taking over, it now works as expected) and added text-indent (in case authors attempt to do some crazy 'image replacement method'.
The comment (* CSS rules preventing author....) can probably be written in better English. I'll leave that open to native speakers :-).
Assignee | ||
Comment 16•16 years ago
|
||
Chris said tonight he wouldn't be able to get to this until the New Year, so taking; I have this all working except
1) watching for about:config changes of a hidden pref (for those who want to honor author styles at all times), though I'm not sure this needs to be live for that use-case, and
2) making sure none of the code I copied is extraneous (haha!)
I feared that the stylesheet loading code would be all over the app and would be non-copyable, but it's pretty self-contained (without the pref UI that ad-blocking and Flashblock use) and seemed even to me like copy/paste coding could work.
Assignee: nobody → alqahira
Assignee | ||
Comment 17•16 years ago
|
||
The one thing that looks worse in my limited testing[1] is the testcase for bug 322218, where we lose what little remnant of a <select> we had left (i.e., the beveled border vanishes). I think that's a very rare case, and I wouldn't block the massive improvement we get far and wide across the web on a case where the one site on which it was found no longer exists.
[1] Sites mentioned in this bug, as well as sites/testcases in Widget:Cocoa bugs mentioning <select>s
Status: NEW → ASSIGNED
Assignee | ||
Comment 18•16 years ago
|
||
Here's a patch that accomplishes this and prevents me from stabbing out my eyes so much. Big thanks to hendy for helping me debug the hidden pref part!
I decided that making the hidden pref change live would be very useful for QA purposes, and it resulted in me learning a little tiny bit more about Obj-C. ;) I also tweaked philippe's CSS file comments, as requested.
Attachment #354028 -
Flags: review?(trendyhendy2000)
Comment 19•16 years ago
|
||
Comment on attachment 354028 [details] [diff] [review]
patch, v1.4
Looks good. The only necessary change I can see is
+ // the Gecko pref observer component isn't set up then. |-xpcomTerminate:|
+ // and |-dealloc:| appear to automatically clean these up.
to
+ // the Gecko pref observer component isn't set up then. The pref change
+ // observers are automatically cleaned up in |-xpcomTerminate:|.
Attachment #354028 -
Flags: review?(trendyhendy2000) → review+
![]() |
||
Comment 20•16 years ago
|
||
(In reply to comment #17)
> The one thing that looks worse in my limited testing[1] is the testcase for bug
> 322218, where we lose what little remnant of a <select> we had left (i.e., the
> beveled border vanishes).
um, yeah... If you want to protect against that MS-theme thingie (a Camino user in corporate environment ?), then using the values as specified in forms.css is probably the way to go. Note that you'll still lose the drop-marker button (that doesn't happen in Minefield, but equally fails in FX 3.0.x - probably got fixed with bug 420363)
select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
-moz-appearance: menulist !important;
border-color: ThreeDFace !important;
background: -moz-Field !important;
color: -moz-FieldText !important;
padding: -moz-initial !important;
font: -moz-list !important;
border-width: 2px !important;
border-style: inset !important;
text-indent: 0 !important;
}
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
-moz-appearance: menulist !important;
background: ThreeDFace !important;
color: GrayText !important;
}
(In reply to comment #18)
> Created an attachment (id=354028) [details]
Thanks for making the pref 'live', that is one enhancement over using usercontent.css :-)
Assignee | ||
Updated•16 years ago
|
Attachment #354028 -
Flags: superreview?(stuart.morgan+bugzilla)
Assignee | ||
Comment 21•16 years ago
|
||
Comment on attachment 354028 [details] [diff] [review]
patch, v1.4
(In reply to comment #19)
> (From update of attachment 354028 [details] [diff] [review])
> Looks good. The only necessary change I can see is
> + // the Gecko pref observer component isn't set up then. |-xpcomTerminate:|
> + // and |-dealloc:| appear to automatically clean these up.
> to
> + // the Gecko pref observer component isn't set up then. The pref change
> + // observers are automatically cleaned up in |-xpcomTerminate:|.
Christopher and I chatted, and I reminded him we've got both the PrefChange observer and the NSNotificationCenter observer, the latter of which is cleaned up in |-dealloc:|. I'll make the comment more clear before checkin.
Stuart, what do you think about the CSS; should we go ahead and make the testcase for bug 322218 look slightly more like something clickable?
Reporter | ||
Comment 22•16 years ago
|
||
Comment on attachment 354028 [details] [diff] [review]
patch, v1.4
>+select:not([size]):not([multiple])[disabled],
>+select[size="0"][disabled],
>+select[size="1"][disabled] {
>+ -moz-appearance: menulist !important;
>+ background: -moz-initial !important;
>+ color: GrayText !important;
>+}
The first two rules here are repeats. Is that just because there is the possibility of a higher-specificity rule using [disabled]? If so, let's add a comment to that effect; if not, they should be removed.
Otherwise, looks good with the other comment change; sr=smorgan. Thanks!
Attachment #354028 -
Flags: superreview?(stuart.morgan+bugzilla) → superreview+
Assignee | ||
Comment 23•16 years ago
|
||
I think that's the case, yes, but I defer to my CSS guru ;)
![]() |
||
Comment 24•16 years ago
|
||
(In reply to comment #22)
...
> The first two rules here are repeats. Is that just because there is the
> possibility of a higher-specificity rule using [disabled]? If so, let's add a
> comment to that effect; if not, they should be removed.
Those can be removed.
Assignee | ||
Comment 25•16 years ago
|
||
Checked in on cvs trunk with the extra CSS removed and the comment clarified; you may now stop poking your eyes out!
Thanks philippe and hendy for the help here!
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: camino2.0b2? → camino2.0b2-
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Flags: camino2.0b2-
Reporter | ||
Comment 26•16 years ago
|
||
(In reply to comment #21)
> Stuart, what do you think about the CSS; should we go ahead and make the
> testcase for bug 322218 look slightly more like something clickable?
Sorry, I meant to reply to this and forgot. Let's file a new bug if we want to look at that, so we can look at before/after and discuss whether it's worth worrying about.
You need to log in
before you can comment on or make changes to this bug.
Description
•