Search code examples
cssapache-flexflex3css-selectorsstylesheet

pseudo-classes in flex css


Does Flex CSS selectors support pseudo-classes?

I want to use different backgroundColor for a canvas based on mouse over and out. I am currently listening to MOUSE_OVER and MOUSE_OUT events and changing the styleName property in the handler functions.

Is there a way I can specify canvasStyle:hover or something?


Solution

  • Only Flex 4 supports something called pseudo-selectors.

    Pseudo-selectors use states defined in your composant.

    See the official documentation for more info.