flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] Apply style to component
Date Fri, 04 Nov 2016 00:03:08 GMT
I'd have to really think through this, but at a quick glance, isn't

	demo-card-wide.mdl-card


an advanced selector that is looking for a className mdl-card inside a
className demo-card-wide?

Also, I think our default container wraps the children in another div in
order to manage complex chrome like in Panel, so immediate child selectors
may not work as expected.  It is a to-do to create a flat, chrome less
Container.

-Alex

On 11/3/16, 4:51 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:

>Hi,
>
>could I have some style in a .css like this:
>
>demo-card-wide.mdl-card {
>  width: 512px;
>}
>.demo-card-wide > .mdl-card__title {
>  color: #fff;
>  height: 176px;
>  background: url('../../../../src/main/resources/Unknown.jpeg') center /
>cover;
>}
>.demo-card-wide > .mdl-card__menu {
>  color: #fff;
>}
>
>and apply to a new component based on container component (called "Card")
>
>in this way:
>
><mdl:Card className="demo-card-wide">
>     <mdl:CardTitle/>
>           ....
>
>?
>
>1.- I was expecting to see the component 512px wide, but this is not
>applied
>2.- since the generated html is well formed as expected, I expected to see
>CSS applying to child nodes as expected.
>3.- If I use in a CardTitle a property "style" I get some styles applied :
>
>color: #fff; height: 176px;
>
>but not "background"
>
>3.- using a <js:Image/> I can get the image loaded, but using the
>"background" style I can't get the image load, maybe is a matter of paths?
>
>-- 
>Carlos Rovira
>http://about.me/carlosrovira

Mime
View raw message