Couple of things:

1) The compiler will prune styles with non-compliant values like
ClassReference from the final CSS output.  The values with ClassReference
still end up in the encoded CSS used by ValuesManager
2) The SimpleCSSValuesImpl does not handle advanced selectors.  That's why
it is called Simple.  My preference would be that we don't use any
advanced selectors at all (there are other ways to do most or all of what
advanced selectors are used for), but I've noticed you seem to want to use
them since they do work on JS.  In order to get SWF-side equivalence, you
will need to write a more advanced CSSValuesImpl.
3) styles that take compliant values are not pruned and if the style name
is not valid CSS, I think some browsers may throw exceptions.  So if you
want to introduce a new style like gap, you'll have to teach the compiler
to filter it out, or use compliant style names like -royale-gap

HTH,
-Alex

On 3/30/18, 7:24 AM, "Peter Ent" <[email protected]> wrote:

>"IBeadLayout" and friends are not real CSS style properties which means we
>can have our own properties. The HorizontalLayoutWithPaddingAndGap should
>try to use ValuesManager and get its gap and padding values from the
>style(s) associated with the strand component.
>
>SomeComponent {
>    IBeadLayout: 
>ClassReference("org.apache.royale.html.beads.layouts.HorizontalLayoutWithG
>a
>pAndPadding");
>    gap: 10px;
>    padding: 8px;
>}
>
>That should work assuming the layout looks for those if its properties are
>not set.
>‹peter
>
>On 3/30/18, 6:42 AM, "[email protected] on behalf of Carlos Rovira"
><[email protected] on behalf of [email protected]> wrote:
>
>>Hi
>>
>>I'm finding a usability problem with layouts. Since Layouts use to be
>>configured via CSS (IBeadLayout), this works ok for basic layouts without
>>properties, but if you have for example a "gap" property like in
>>HorizontalLayoutWithPaddingAndGap, this layout is not usable vía CSS
>>since
>>you can't set the "gap" attribute.
>>
>>So how can we overcome this issue?
>>
>>Maybe If we could write:
>>
>>SomeComponent
>>{
>>     IBeadLayout: Classreference
>>("some.layout.with.properties.that.need.to.be.set");
>>     gap: 10px;
>>}
>>
>>And gap will be read by the layout...
>>
>>if not any layout with properties will be limited to use via MXML
>>
>>Maybe I missing some other way to do this?
>>
>>-- 
>>Carlos Rovira
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%
>>2
>>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7C947a4da3ad454e41b5a308d59
>>6
>>2b0765%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636580033926916536&sd
>>a
>>ta=%2F6sMPKv420V%2BMUL1M7eiFVFN8YdOwdbugU%2B5PJDwde4%3D&reserved=0
>

Reply via email to