Opened 12 years ago

Closed 12 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 bill)

Form widgets (at least button-type widgets) typically have the following states:

  1. inert/hover/active/disabled
  2. checked (or not)
  3. 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 12 years ago by bill

Status: newassigned

comment:2 Changed 12 years ago by bill

Description: modified (diff)

comment:3 Changed 12 years ago by bill

Resolution: fixed
Status: assignedclosed

(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.

Note: See TracTickets for help on using tickets.