Maybe something like:
Shared CSS:
.myStyle {
colorName: 'red';
}
Application creation complete:
var c:CSSStyleDeclaration =
this.styleManager.getStyleDeclaration(".myStyle");
var myColor:String = c.getStyle("colorName");
Alert.show('MyColor: ' + myColor);
You could also set a hex value for
On 12/7/16, 5:28 AM, "Ghazi Triki" wrote:
>Hello,
>
>Is there any way to define a colour name as variable in CSS?
I think it depends. How are you using it? In MXML or AS? The compiler
might already have a list of known color names that is less easy to extend.
Hello,
Is there any way to define a colour name as variable in CSS? I want to
avoid "PropertyReference" as the style or theme will be shared between
multiple applications.
I tried using styleManager.registerColorName at the application
preinitialize but it does not reload color definitions and