Opened 14 years ago
Closed 14 years ago
#3818 closed task (fixed)
widget state classes
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Form widgets (at least button-type widgets) typically have the following states:
- inert/hover/active/disabled
- checked (or not)
- selected (or not)
We set class attributes on Widget.domNode to reflect these states. Note that for tundra, a certain state may only affect a sub-node of Widget.domNode. For example, a ToggleButton? in "checked" state doesn't change the button itself, but only the icon inside the button. Nonetheless, we set the class on Widget.domNode so other themes have the ability to change the look of the outer node.
_FormWidget::_setStateClass() should set multiple classes on the Widget.domNode, based on the widget's states:
For a menu item that's checked and selected, it should set the class "dijitMenuItem dijitMenuItemChecked dijitMenuItemSelected dijitMenuItemCheckedSelected"
Current code has just a single class but that's led to tundra.css becoming very big.
Change History (3)
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [9727]) Apply multiple classnames to a node, to make it easier to write orthogonal rules. Ex: "buttonChecked buttonHover buttonCheckedHover", instead of just "buttonCheckedHover".
Fixes #3818.