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] CSS (was Re: [FlexJS] Mobile Apps)
Date Mon, 24 Oct 2016 22:17:34 GMT


On 10/24/16, 2:49 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com> wrote:

>Hi Om,
>
>the last sample seems good to me and I agree with avoid having the
>"effect"
>attribute in the class and promote composition. So to start, I would
>remove
>the "mdlEffect" attribute from mdl components and instead create a bead
>with it, ok?

It really is up to you (and customer feedback).  Another advantage of
beads is that it makes the MXML full declarative.  The compile will catch
you if you mistype <mdl:FAB> but will not catch you nor provide code
assist as you try to type "mdl-button--fab" and somehow remember to add
two hyphens in the right place.  It is a trade-off of verbosity vs
catching compile time issues.  I don't think there is a right answer, and
you can always provide more than one approach.

Also realize that if you have more than one way to set className, folks
will may have to learn the order in which things are added to className.
If they want to inject some custom class selector and thus do:

<mdl:Button class="myCustomClass">
  <mdl:Beads>
    <mdl:effect1>
    <mdl:effect2>
    <mdl:effect3>
  </mdl:Beads>
</mdl:Button>


How will they control where myCustomClass goes in the className list?

Anyway, just pick something for now.  Best plan is to get something that
folks can use, then you can get more opinions of how to make it easier.

-Alex

Mime
View raw message