Flex4 external style sheets PropertyReference

I am trying to declare a style property as the value of some variable. This is done fairly easily in a component with a call to "PropertyReference". Example:

<fx:Style> ... s|TextInput { color: PropertyReference("some.other.package.MyClass.colorVariable"); } </fx:Style> 

However, I am trying to do this in an external stylesheet and load it into the top-level <s:Application> component using <fx:Style source="myStyles.css"/> . However, this does not compile. It seems that using the PropertyReference property is fine, but it seems like it cannot resolve the path to the variable that I want to use.

Does anyone know how to do this correctly?

+4
source share
1 answer

Since you include your css with <fx:Style source=""/> , it should only contain CSS. Since you need to add program code to your CSS, you can try loading the stylesheet at runtime

0
source

Source: https://habr.com/ru/post/1434882/


All Articles