开发者

adobe flash builder 4: css type selectors are not supported in components spark.components.Label [duplicate]

This question already has an answer here: Closed 9 years ago.

Possible Duplicate:

Warning: css type selectors are not supported in components ‘sparks.component.TextInput’

I created a new MXML component that contains some labels and the following style:

<fx:Style>
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";
    @namespace local "*";
    s|Label {
        font-size:12;
        font-weight:bold;
        color:white;
    }
    #timeLeftH开发者_StackOverflow社区Group {
        left:30;
        top:12;
    }

I get the following warning at the s|Label line:

CSS type selectors are not supported in components: 'spark.components.Label'    

Well.. the CSS code does work! it did change the color, make the text bold and changed the font size to 12, so why do i get this warning ?


s| is ignored as it's not supported when used inside of a component. Try putting it in a root level style sheet which is applied to the entire application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜