警告:组件';中不支持CSS类型选择器;sparks.component.TextInput';
我试图做一个简单的CSS声明。然而,我得到了上面的警告,不知道如何解决它。我想s|(类型)应该为我声明样式警告:组件';中不支持CSS类型选择器;sparks.component.TextInput';,css,apache-flex,types,flex-spark,Css,Apache Flex,Types,Flex Spark,我试图做一个简单的CSS声明。然而,我得到了上面的警告,不知道如何解决它。我想s|(类型)应该为我声明样式 <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; s|TextInput{ color:#313131; }
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|TextInput{
color:#313131;
}
</fx:Style>
<s:Panel width="600" height="480" skinClass="skins.CustomPanel">
<s:layout>
<s:VerticalLayout paddingTop="7"/>
</s:layout>
<s:TextInput text="TextInput CSS not working"/>
<mx:Form>
<mx:FormHeading label="Please Enter The Information"/>
<s:HGroup>
<mx:FormItem>
<s:Label text="Brand"/>
<s:TextInput id="brand" text="CSS not working" width="156"/>
</mx:FormItem>
</mx:form>
@命名空间s“library://ns.adobe.com/flex/spark";
@名称空间mx“library://ns.adobe.com/flex/mx";
s |文本输入{
颜色:#313131;
}
组件定义中不允许使用CSS类型选择器
您有两个选择:
- 改用类选择器
- 在顶部MXML文件中声明的css中移动类型选择器声明