Hi Mark, right, I was aware that I can do this in my App. But what I want to do with this thread is to bring attention to our current "width" and "height" implementation I think we should have in some way or another a way to get things done in AS3/MXML instead to go down and create and assign a CSS selector. For me that's a workaround for Royale. Is a solution, but I expect that if I need to set a "max width" in a component do this with a property or, if we don't agree to add it to UIBase, create a Bead for that.
As you say CSS is very powerful, and I like it far more that CSS in Flex. In fact I tried to create Jewel Layouts to leverage CSS as much as possible. But the only problem is that CSS is somewhat separated from AS3, so sometimes you need some control or some way to change things vía AS3 or with a resize handler or something more programmatically. For that reason we need both ways to do things. *So, to refocus on the topic that open this thread. For me the decision is about:* *a) To use NaN in width and height, make this little change in setWidth to be able to use NaN* *this.positioner.style.width = isNaN(_width) ? "initial" : value.toString() + 'px'; * *(don't see other way to deal with this)* *b) for max and min we can go with getter/setters baked in UIBase, or create a Bead for each one.* Thoughts? Carlos El vie., 11 ene. 2019 a las 20:59, Kessler CTR Mark J (<[email protected]>) escribió: > I'm slow getting to these emails, so if I've missed any, I apologize. > > After this last two weeks I've come to the realization that the FlexBox > CSS style is greatly more flexible(no pun intended twice) than most of what > we have in AS. I could write a pile of examples for most common layouts if > it had enough interest. These were styles I ended up assigning using CSS > selectors assigned to MXML via the className property. I could even fix > formatting issues I was having in Jewel by overriding the styles this way. > > > If you really wanted to use a max width without adding coding overhead to > the SDK you could just add in CSS file selector to use max-width. > > > .MyStyle > { > Max:width: 200px; > } > > > <j:VGroup className="MyStyle"> > <child /> > <child /> > </ j:VGroup> > > > It would cut off any overflow by default. If you'd prefer you could use > the "flex-wrap: wrap" to have it wrap the children in the cross axis > direction. > > I'll have to add more to the email later on, but this part can go out > now. Could make a very large wiki page on layout in MXML with the flexbox > logic. > > -Mark K > > > > > -----Original Message----- > From: Carlos Rovira [mailto:[email protected]] > Sent: Thursday, January 10, 2019 2:50 PM > To: [email protected] > Subject: [Non-DoD Source] Re: Things that we still doesn't have and need > in UIBase sizing > > Hi Mark, > > thanks for joining to the discussion: > > > El jue., 10 ene. 2019 a las 20:31, Kessler CTR Mark J > (<[email protected]>) escribió: > > > > > Back on topic, I was able to avoid using max size declarations by adding > > in CSS to utilize the flex-box CSS alignments to fill and distribute > sizes. > > > > > > Very interesting, could you provide some code example so I can understand > the concept? I'm interested in that technique > > thanks > > -- > Carlos Rovira > http://about.me/carlosrovira > -- Carlos Rovira http://about.me/carlosrovira
