royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: Styling express components
Date Wed, 25 Oct 2017 17:31:18 GMT
I have used that, but I forgot to include it.

How does that work? Is the declared style object preserved (i.e. BindableCSSStyles) when declaring
the style as a string?

> On Oct 25, 2017, at 8:13 PM, Alex Harui <aharui@adobe.com.INVALID> wrote:
> 
> There is a fourth, which is to declare styles as in HTML:
> 
> <js:SomeComponent style="fontWeight:bold; fontStyle:italic" />
> 
> There should be some usage of it in RoyaleStore.
> 
> We could fatten the API surface of Express to populate every CSS style
> onto the components, but IMO, it gets nasty when you want to allow for
> non-standard/browser-specific styles (--moz-xxx).  So, that's why, at
> least for now, Royale does not put styles in the APIs.
> 
> It would be cool if the newer IDEs would help check for mis-spellings and
> invalid values in that HTML-like style syntax.
> 
> HTH,
> -Alex
> 
> On 10/25/17, 3:14 AM, "Harbs" <harbs.lists@gmail.com> wrote:
> 
>> I’m trying to figure out the best way to make it easier to declare
>> styling for express components.
>> 
>> Right now, I know of three ways to set styling:
>> 1. Using class names in css blocks
>> 2. programmatically setting the values when the component is initialized
>> 3. using js:style mxml blocks and declaring some kind of stlye object in
>> that.
>> 
>> None of these options are as easy as what we had in Flex.
>> 
>> In Flex, you could just declare the styling options as attributes of the
>> main tag. Even option #3 is problematic because it makes it too easy to
>> swap out the style object defined in the component, so BindableCSSStyles
>> might be replaced with the non-bindable version by mistake.
>> 
>> One option is that we can add getters and setters for the styles that
>> Flex supported natively. That would use whatever CSS object is created by
>> default, and support simple declarations in the main tags.
>> 
>> Another option would be to add a new setter which takes an object of any
>> type and for-ins the object to insert the values into the default styles
>> object in the component.
>> 
>> One variation on the first option is to create a new “styleable”
>> component set which has a large gamut of style-able proprties (and
>> possibly a better skinning story). Maybe express could be middleweight
>> components and “styleable” or “skinnable” would be a heavier-weight
>> component set which would be closer to Flex components.
>> 
>> Thoughts?
>> 
>> Harbs
> 


Mime
View raw message