I have a simple button in the mxml file, if I set the skinClass property in the tag itself, this works, however, if I set the skinClass property in an external css file, this does not apply to the button.
Works:
view.mxml
<s:Button id="btnRefresh" skinClass="skins.RefreshButtonSkin"/>
Does not work:
view.mxml
<s:Button id="btnRefresh"/>
style.css
#btnRefresh { skinClass: ClassReference("skins.RefreshButtonSkin"); fontSize: 12px; }
Does anyone know how I can make this css work?
Note. I can apply other styles to the button using css e.g. fontSize works
Edit: Additional Information
The button is nested in the actionContent part of my view
view.mxml
<s:actionContent> <s:Button id="btnRefresh"/> </s:actionContent>
The css file is declared in my main mxml file
main.mxml
<fx:Style source="style.css"/>
I am compiling for flex 4.5.1, this is a mobile application
source share