Closed Bug 997200 Opened 12 years ago Closed 12 years ago

Create a :-moz-appearance(value) pseudo class

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ntim, Unassigned)

Details

It'd be nice to be able to select elements with a specific -moz-appearance value. It would make a lot of things much easier : Hide the select button with -moz-appearance: none in forms.css : select > input[type="button"]:-moz-appearance(none) { display:none } Hide the number spinner with any non-default -moz-appearance value : input[type="number"]:not(:-moz-appearance:number-input)::-moz-number-spinner { display: none; }
What do you think David ?
Flags: needinfo?(dbaron)
> It'd be nice to be able to select elements with a specific -moz-appearance value. The problem is that the rule with that selector can then change the -moz-appearance value, no? This is a general problem with all proposals that suggest selecting on CSS property values...
(In reply to Boris Zbarsky [:bz] from comment #2) > > It'd be nice to be able to select elements with a specific -moz-appearance value. > > The problem is that the rule with that selector can then change the > -moz-appearance value, no? This is a general problem with all proposals > that suggest selecting on CSS property values... Good point, well, I guess the -moz-appearance property would be ignored inside a :-moz-appearance() rule.
I don't see why you'd actually want to do either of the things in comment 0. Further, there's the point that Boris made that we generally don't have selectors that depend on properties. If there's a strong need for something like that we can add concepts like dependency-avoidance per comment 3, but I don't actually see why you want the things in comment 0 in the first place.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(dbaron)
Resolution: --- → WONTFIX
Summary: Create a :-moz-appearance(value) pseudo element → Create a :-moz-appearance(value) pseudo class
(In reply to David Baron [:dbaron] (needinfo? me) (UTC-7) from comment #4) > I don't see why you'd actually want to do either of the things in comment 0. Many people requested to be able to fully style the select box with -moz-appearance:none (which also means replacing the select arrow). For the number spinner, we already do this with C++ code. > Further, there's the point that Boris made that we generally don't have > selectors that depend on properties. If there's a strong need for something > like that we can add concepts like dependency-avoidance per comment 3, but I > don't actually see why you want the things in comment 0 in the first place. Well, we need this to replace the inner focus outline in unstyled state with the new blue focus border in bug 997190. Is there another way to do this ?
Flags: needinfo?(dbaron)
Also in bug 997190, we need to fully restyle the select boxes when -moz-appearance:none; is used.
Ah, so you're talking about styling the input based on whether the select that contains it has appearance:none rather than based on whether the input itself has appearance:none (as you wrote in comment 0). Still need to think about the other question.
(In reply to David Baron [:dbaron] (needinfo? me) (UTC-7) from comment #7) > Ah, so you're talking about styling the input based on whether the select > that contains it has appearance:none rather than based on whether the input > itself has appearance:none (as you wrote in comment 0). Whoops, yes.
(Which is part of why it's best to request features by saying what you're trying to do, not by offering syntax that you think would do what you want.)
(In reply to David Baron [:dbaron] (needinfo? me) (UTC-7) from comment #9) > (Which is part of why it's best to request features by saying what you're > trying to do, not by offering syntax that you think would do what you want.) Detecting if the element is currently using the native styling or not. :-moz-native might be a good choice too. But that still brings up the issue that Boris mentioned.
But the reason you want to do *that* is to do comment 5, which doesn't have to be done in CSS, and probably shouldn't be.
Flags: needinfo?(dbaron)
You need to log in before you can comment on or make changes to this bug.