开发者

I'm having some trouble with css

开发者 https://www.devze.com 2023-02-15 17:12 出处:网络
I keep getting this warning in css: Type \'AutoComplete\' in开发者_Python百科 CSS selector \'AutoComplete\' must be qualified with a namespace.

I keep getting this warning in css:

Type 'AutoComplete' in开发者_Python百科 CSS selector 'AutoComplete' must be qualified with a namespace.

I can't seem to get it fixed. Any ideas? I've tried adding namespaces but no go. :S


In Spark, some of the components have the same names as some of the older mx components. For this reason, adobe requires namespaces when declaring CSS Styles, like the following:

<Style>
  @namespace mx "library://ns.adobe.com/flex/mx"; (mx components)
  @namespace s "library://ns.adobe.com/flex/spark"; (spark components)
</Style>

This goes in the top of your CSS stylesheet. If you look at your <Application> code in the root of your project, you will see something like the following:

<s:Application ... xmlns:s="library://ns.adobe.com/flex/spark" ...>

In this case, your stylesheet.css would need the following:

@namespace s "library://ns.adobe.com/flex/spark";

Hope this helps...


Components in the CSS file must have their namespace specified. At the top of the CSS file should be something like:

@namespace mx "library://ns.adobe.com/flex/mx";

And your CSS declaration for the AutoComplete from should look something like this:

mx|Form{ //Some style stuff }

Substitute mx and Form with AutoComplete and its namespace respectively.


According to the site, adding something this to your CSS should help:

    @namespace components “com.hillelcoren.components.*”;

    components|AutoComplete
    {
    selected-item-style-name: macMail;
    }
0

精彩评论

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

关注公众号