I use a file for declaring CSS styles:
/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace view "com.myviews.*";
@namespace comp "com.myviews.mycomponents.*";
@font-face {
font-family:arial_s;
src:url("Fonts/Arial.ttf");
embed-as-cff:true;
font-weight:normal;
font-style:normal
}
@font-face {
font-family:arial_mx;
src:url("Fonts/Arial.ttf");
embed-as-cff:false;
font-style:normal;
font-weight:normal;
}
global {
font-family:arial_s; font-size:12.5;
}
s|DropDownList {
cornerRadius:0;
}
Q1: I get this warning on the line above for s|DropDownList:
The CSS type selector 'spark.components.DropDownList' was not processed, because the type was not used in the application.
But it IS used in the application, and changing its value here DOES have an effect. Any idea why I'm getting this warning?
Q2: When I run the application in debug mode, I get the warning:
warning: incompatible embedded font 'arial_s' specified for mx.core::UITextFormat. This component requires that the embedded font be declared with embedAsCFF=false.
The warning is coming because I've used the global attribute for spark components above, and this causes it to be applied to all components including some mx components. The component of interest here is text in a DataGrid cell. I just need to figure out how to separately define the style for mx.core::UITextFormat. Any idea what the syntax is for this? I tried:
mx|UITextFormat {
font-family:arial_mx;
}
but it doesn't work. Not sure what to do. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/UITextFormat.html