> On Sep 4, 2018, at 7:34 PM, Alex Harui <[email protected]> wrote: > > Or not. Layouts are easy to change out. I agree that it would be nice to > have better naming/hinting about potential layout issues, but it wouldn't be > the highest priority IMO. > > But adding function calls on every instance of UIBase when only a few had > this collision seems not very PAYG to me. I would hope that there are other > ways to deal with this. First off, are you sure reading style (and not > calling getComputedStyle) forces a reflow/layout? > > UIBase already stores the "display" style in a variable to handle the reuse > of style.display for the visible property. Some other version of > VerticalLayout could see if the display style is any of the "block" styles > ("block", "flex", "grid"?).
For now, I removed the getter method and just made the property public instead of protected. I don’t think that’s any heavier than it was before and resolves the problem... > > I didn't follow your argument about using classNames for layouts. That > sounded like we would need to call getComputedStyle(). I mean, a layout could track its own settings and not have to use browser DOM. > My 2 cents, > -Alex > > On 9/4/18, 1:23 AM, "Harbs" <[email protected]> wrote: > > If we’re going to have “compatible sets”, we’re going to need some way of > organizing them (naming or otherwise) to indicate which sets of layouts are > compatible with each other. > >> On Sep 4, 2018, at 10:28 AM, Alex Harui <[email protected]> wrote: >> >> It seems to me that there are going to be incompatible sets of layouts. >> IOW, if you want to use flexbox, you may have to use flexbox layouts in all >> parents. And not use percentages in the children (IIRC). And not nest >> flexboxes, etc. > > >
