You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "jiks@afg" <ku...@gmail.com> on 2014/04/30 08:02:11 UTC

styles are not setting from same name css file

Hi,

My use case is as follows:

I have  one  library project which have css file  with name x and i set some
styles  here .

Now i create  the same styles structure in main application project  with
same  name of css file and set part of styles here.

when i run my application then styles (Like Alert/Button class level styles)
are apply which are set in   main application css file, but if i set  same
styles(Like Alert/Button class level  styles) in library css file then
theses styles are not applying. to apllication.

Is there any heirarchy issue ..or best way to ovevride css file styles.


.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/styles-are-not-setting-from-same-name-css-file-tp6332.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: styles are not setting from same name css file

Posted by Alex Harui <ah...@adobe.com>.

On 4/29/14 11:02 PM, "jiks@afg" <ku...@gmail.com> wrote:

>Hi,
>
>My use case is as follows:
>
>I have  one  library project which have css file  with name x and i set
>some
>styles  here .
>
>Now i create  the same styles structure in main application project  with
>same  name of css file and set part of styles here.
>
>when i run my application then styles (Like Alert/Button class level
>styles)
>are apply which are set in   main application css file, but if i set  same
>styles(Like Alert/Button class level  styles) in library css file then
>theses styles are not applying. to apllication.
>
>Is there any heirarchy issue ..or best way to ovevride css file styles.
IIRC, there is an ordering issue.  If more than one SWC defined css for a
component, I think last one or newest one wins.  The application's styles
are always last and always win.  I believe you can explicitly set the
order the SWCs are used.

Technically, it isn't really "last one wins", all styles are applied in
some order but if a style is set early and the same style property is set
later, then the later one "wins".

-Alex