I would suggest creating a CSSStylesImpl (or CSSStylesImpl) which would have as 
much HTML css support as possible.

That would probably be the default goto for most HTML apps.

Harbs

> On Mar 5, 2017, at 7:41 AM, Alex Harui <aha...@adobe.com> wrote:
> 
> Hi Justin,
> 
> Again, with PAYG, we want SimpleCSSStylesImpl to be simple and we want the
> SWF side to remain at parity.  This sort of thing is better placed in a
> NotSoSimpleCSSStylesImpl.
> 
> Thanks,
> -Alex
> 
> On 3/4/17, 5:54 PM, "jmcl...@apache.org" <jmcl...@apache.org> wrote:
> 
>> Repository: flex-asjs
>> Updated Branches:
>> refs/heads/develop 5f43ec5fa -> 81712dc21
>> 
>> 
>> Add JS support for non pixel numeric properties ie fontWeight
>> 
>> 
>> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/81712dc2
>> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/81712dc2
>> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/81712dc2
>> 
>> Branch: refs/heads/develop
>> Commit: 81712dc21508a43c0918f6fb8f6254930481ef95
>> Parents: 5f43ec5
>> Author: Justin Mclean <jmcl...@apache.org>
>> Authored: Sun Mar 5 12:54:03 2017 +1100
>> Committer: Justin Mclean <jmcl...@apache.org>
>> Committed: Sun Mar 5 12:54:03 2017 +1100
>> 
>> ----------------------------------------------------------------------
>> .../flex/org/apache/flex/core/SimpleCSSValuesImpl.as     | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>> ----------------------------------------------------------------------
>> 
>> 
>> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/81712dc2/frameworks/
>> projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
>> ----------------------------------------------------------------------
>> diff --git 
>> a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSVal
>> uesImpl.as 
>> b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSVal
>> uesImpl.as
>> index 1c0451c..6b0527d 100644
>> --- 
>> a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSVal
>> uesImpl.as
>> +++ 
>> b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSVal
>> uesImpl.as
>> @@ -691,6 +691,14 @@ package org.apache.flex.core
>>            'borderColor': 1,
>>            'color': 1
>>        }
>> +
>> +        /**
>> +         * The styles that can use raw numbers
>> +         */
>> +        COMPILE::JS
>> +        public static var numericStyles:Object = {
>> +            'fontWeight': 1
>> +        }
>> 
>> 
>>        /**
>> @@ -714,6 +722,7 @@ package org.apache.flex.core
>>            var styleList:Object = SimpleCSSValuesImpl.perInstanceStyles;
>>            var colorStyles:Object = SimpleCSSValuesImpl.colorStyles;
>>            var skipStyles:Object = SimpleCSSValuesImpl.skipStyles;
>> +            var numericStyles:Object = SimpleCSSValuesImpl.numericStyles;
>>            var listObj:Object = styles;
>>            if (styles.styleList)
>>                listObj = styles.styleList;
>> @@ -728,6 +737,8 @@ package org.apache.flex.core
>>                if (typeof(value) == 'number') {
>>                    if (colorStyles[p])
>>                        value = CSSUtils.attributeFromColor(value);
>> +                    else if (numericStyles[p])
>> +                        value = value.toString();
>>                    else
>>                        value = value.toString() + 'px';
>>                }
>> 
> 

Reply via email to