royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <>
Subject Re: Trying to remove "style" attribute set by Royale. First let's focus on style="display:block"
Date Mon, 12 Mar 2018 18:21:52 GMT
Hi Carlos,

These layout classes have worked fine for dozens of example.  They are
small, simple and stupid.

I don't understand why, if you want vertical layout, you want to set a
child's display to "inline-block".  That would not layout vertically
unless you are counting in line-wrapping.  To me, that is an exception
case, and extra code and an additional layout class is the PAYG way to
deal with it.

To me, there is no excess HTML code because we do not generate much HTML
at all!  We do run a bunch of JS that creates HTMLElements, but that is
not tags in an HTML file that has to be parse by the browser, so other
than some opinion of what is "best", we need to run profiling to determine
the trade-offs.  Harbs claims that having JS set the style object is
better than having JS set classnames.  You will need to prove him wrong.

And still, I don't believe whether we use the style object or not is going
to cause people to not use Royale.  We can clean this up later.

My 2 cents,

On 3/12/18, 11:11 AM, " on behalf of Carlos Rovira"
< on behalf of> wrote:

>Hi Alex,
>no, I want the normal effect of a vertical layout, since finaly is get in
>both ways.
>The problem for me is :
>1) people that wants to change it must subclass layout to modify, instead
>of override css rule
>2) there's an excess of html code since in each component inside the
>the current approach with inline styles are generating the style attribute
>for all components, so this ends in bloated code that I don't see in any
>example of UI sets out there
>2018-03-12 18:41 GMT+01:00 Alex Harui <>:
>> On 3/12/18, 10:11 AM, " on behalf of Carlos
>> < on behalf of> wrote:
>> >>
>> >> I still don't get why, if your Button is a subcomponent, some
>> >> code was setting display style on it unless you were using a layout
>> >>class
>> >> in the component itself.
>> >>
>> >
>> >that's the side effect of inline styling, as I put the button inside a
>> >vertical layout, the layout imposes display: block
>> >while my css dictates display: inline-block. The browser shows the
>> >strikes out. For me that behavior can be right
>> >if I can change easily from CSS overriding rule, but not if is a line
>> >code inside a framework that makes me override a whole class
>> >to change an inline style.
>> Just to be sure I understand, your goal was to use vertical layout but
>> make one child not layout vertically?  Sort of like "includeInLayout" in
>> Flex?
>> Handling exceptions usually requires more code.  So it sounds like you
>> creating layouts that allow for exceptions, which seems like a
>> thing to do.  The existing layouts will be more simple (and essentially
>> stupid) but will do the job with the least code when exceptions are not
>> needed.
>> That's how I understand it.
>> -Alex
>Carlos Rovira

View raw message