tolo / InterfaCSS

The CSS-inspired styling and layout framework for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extendable ISSPseudoClass

tbrannam opened this issue · comments

I'm finding times when I'd like to style parts of a UIControl that aren't covered by the normal UIControlState values.

I'm playing with extending PseudoClasses, adding selected and highlighted. This allows me to change a wider number of style-able properties based on the state of the control.

    case ISSPseudoClassTypeControlStateSelected: return @"selected";
    case ISSPseudoClassTypeControlStateHighlighted: return @"highlighted";
    // similar treatment as enabled/disabled
    case ISSPseudoClassTypeStateEnabled: return @"enabled";
    case ISSPseudoClassTypeStateDisabled: return @"disabled";

I could see the being part of the default set of PseudoClasses - but it perhaps this is really a feature request for supporting an extensible ISSPseudoClass implementation?

Yes, I've actually also encountered situations where having support for more control states in pseudo classes would have been useful, so I will probably add that quite soon.

Extensibility of ISSPseudoClass could of course also be interesting, and I'll certainly keep that in mind going forward.

Thanks,
Tobias