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] Group container
Date Mon, 06 Mar 2017 22:02:33 GMT


On 3/6/17, 1:26 PM, "piotrz" <piotrzarzycki21@gmail.com> wrote:

>Hi Peter,
>
>It looks awesome. Cause if I'm enough skilled in CSS I can do whatever
>layout I want and I don't need to know any other one. - In theory. :)

True, but like with everything else in FlexJS, we are trying to
encapsulate common patterns and make them easier to use.

So for example if you have 3 children in a container and want to make the
first one stretchy,  you might have to write:

<Group style="display:flex" />
  <Label style="flex-grow: 2" />
  <Button style="flex-grow: 1" />
  <Button style="flex-grow: 1" />
</Group>

Whereas with a layout you could write:
<Group>
  <beads>
    <FirstFlexibleChildLayout />
  </beads>
</Group>

That way you don't have to remember the names of the styles or look up how
to do it.

Hopefully our Layouts will essentially do just that once Peter's done with
this refactor.

Of course, I could be wrong...
-Alex

Mime
View raw message