I'm writing a jQuery UI widget and trying to stick to the built-in styles whenever possible, to allow theme-roller skinning. I have a structure that looks (simplified) roughly like this:
<div class='ui-state-active'>
<div class='ui-state-default'>
<div class='ui-icon ui-icon-triangle-1-e'/>
</div>
</div>
The problem is that ui-icon
switches its icon set depending on the ui-state
of its ancestors. But ui-state-active
on the element further up the hierarchy appears to take precedence over ui-state-default
on its immediate parent, resulting in an icon that typically blends in with its background.
I could manually override the background for the ui-icon
element, but then the widget is no longer themeable. Is there another way to prevent ui-state-active
from affecting that icon?