تحذير: لا يتم دعم محددات نوع CSS في المكونات "Sparks.component.textInput"
-
30-09-2019 - |
سؤال
أحاول القيام بإعلان 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>
<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>
المحلول
لا يُسمح بمحددات نوع CSS داخل تعريف المكون.
لديك خياران:
- استخدم محدد فئة بدلاً من ذلك
- انقل إعلان محدد النوع في CSS الذي تم إعلانه في ملف MXML الأعلى
لا تنتمي إلى StackOverflow