Closed
Bug 115351
Opened 23 years ago
Closed 23 years ago
Implement new CSS3 pseudoclasses
Categories
(Core Graveyard :: Skinability, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 115462
mozilla0.9.8
People
(Reporter: hyatt, Assigned: hyatt)
Details
Ian Hickson wrote:
I have issues with the isDisabled, isChecked and isSelected functions in
nsNativeThemeWin.cpp.
Using attributes directly like this IMHO is not going to work on the long term.
I think what we should do is bite the bullet and implement the pseudo-class
setting stuff that we've been talking about. Make the XBL for the widgets
toggled the :checked, :indeterminate (tri-state), :disabled, and :enabled
pseudo-classes, then use those in the theme API to determine status instead of
hardcoding knowledge for every widget set we want to support.
This would require us to add two functions to all elements,
element.setPseudoClassState('pseudo', bState)
bState = element.setPseudoClassState('pseudo')
...which know how to toggle the states of:
'enabled', 'disabled' (mutually exclusive)
'checked', 'indeterminate' (mutually exclusive)
'focus' (only one element can be set at a time)
'active' (only one element can be set at a time)
'hover' (only one element can be set at a time)
So then the XBL for XUL checkboxes would, as well as toggling its attributes on
a click, set the pseudo-class. This would make it easier to style the control in
CSS and would make this API a lot more resilient when it comes to implementing
other controls in XBL (e.g. a widget set that uses japanese attribute names).
e.g.
this.setPseudoClassState('checked', nowChecked);
(Note that selected items are classified as checked for now. Feel free to add
:unchecked, it's only not in the selectors spec because of an oversight.)
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.8
Comment 1•23 years ago
|
||
hixie filed bug 115462, which is a fuller statement of the above.
*** This bug has been marked as a duplicate of 115462 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•