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] General questions
Date Mon, 09 Sep 2013 05:42:00 GMT


On 9/8/13 10:01 PM, "flexcapacitor@gmail.com" <flexcapacitor@gmail.com>
wrote:

>Yes, I agree. What might alleviate that pain would be:
>
>€ move all the styles metadata into the skin instead of the component.
>have
>the component declare skin styles like we declare skin parts, so
>[SkinStyle(name="color", required=true)]
>€ or allow styles to be declared in the skin and make the compiler add
>those styles to the list of styles available to that component type for
>code completion and compilation
>€ or add a compiler flag to ignore attributes it is not aware of
>(highlight
>in a different color?) and treat those unknown attributes as styles.
>€ or add a styles proxy object on the component for styles not known to
>the
>component
>
><button>
>   <styles color="red" cornerRadius="8" />
></button>
>
>I would prefer the above to inline, "color:red;cornerRadius:8".
>
>The more I think about it MXML should be a generic XML description of an
>application. Since we want MXML to output to other languages things like
>binding expressions and inline name value pairs like,
>style="fontFamily:Arial;fontWeight:bold" are getting away from the one of
>the reasons that XML was created; that being readability.
>
>I think another feature of an XML spec is that it defines guidelines for
>parsers. E4X is an advanced notation to get right to the information you
>need in an XML document. With, style="color:yellow;fontFamily:Times New
>Roman" you would need to use E4X to get the attribute and then another
>expression engine, RegExp, to get the names and values you need.
>
>I'm not saying no to inline styles but to keep in mind MXML's roots. In
>time, as MXML is adopted, the tooling and the developer base will grow as
>well and I would think we'd want a distributable document to be as
>portable
>and parsable as possible (say that 3 times fast).
All good thoughts and suggestions.   I'm still not sure what we're going
to do, but I've ruled out only using html-like inline styles for now.
>
>Are you using the style property as a proxy to the CSS class now?
>
>MXML,
><style source="styles.css"/>
><button style="MyStyles" />
>
>HTML,
><stylesheet src="styles.css"></stylesheet>
><input class="MyStyles"></input>
>
Yes, and some properties like width and height get set in HTML on the
styles object.  Although today, it only works for known CSS properties.
I'm exploring what to do for custom CSS properties, especially in IE8.

The goal is to find best practices in HTML/JS then wrap and present them
in AS3.

-Alex


Mime
View raw message