Sorry, I missed the fontWeight entry in SimpleCSSStyles. You have a point then.

From: Justin Mclean<mailto:jus...@classsoftware.com>
Sent: Sunday, March 5, 2017 1:45 PM
To: dev@flex.apache.org<mailto:dev@flex.apache.org>
Subject: Re: git commit: [flex-asjs] [refs/heads/develop] - Add JS support for 
non pixel numeric properties ie fontWeight

Hi,

> SimpleCSSStyles contains all the style names that SimpleCSSStylesImpl is 
> guaranteed to support.

Of which font weight is an existing one. I’m not added support for something it 
didn’t support just fixing a bug for something it supported.

> So I wouldn’t say fontWeight not being supported by SimpleCSSStylesImpl was a 
> bug, unless it were added to SimpleCSSStyles.

As I said it already supports it. If you look at the class you’ll see this 
property:

native public var fontWeight:*;

> I think if you want to be safe in MXML, it’s best to avoid using string 
> values for style and to use objects such as SimpleCSSStyles insead.

Which is what I did. My fix allows this:

<js:Container>
   <js:Label text="The quick brown fox jumped over the lazy dog. (600)">
       <js:style>
           <js:SimpleCSSStyles fontFamily="Catamaran" fontWeight="600"/>
       </js:style>
   </js:Label>
</js:Container>

Without that change the above code has no effect and the font weight is not set.

Thanks,
Justin

Reply via email to