You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by pnayak <na...@yahoo.com> on 2014/07/25 04:35:16 UTC

defaults.css vs static initialization of styles

Hi All,

I have a question on styling custom components with custom styles.

The main component contains several children which are all custom components
(extensions of UIComponent) and some of them have additional children. 

Most of these of have custom styles defined. And in each case their default
values are being set using a static initializer as mentioned in this
link.(http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf687e7-7ff6.html#WS2db454920e96a9e51e63e3d11c0bf69084-79d9)

The problem is that when the first instance of this component is added to
the display list it takes almost 2-3 seconds. Additional instances of the
component don't have any delay when being added to the display list. And it
looks the static initialization is what is causing this delay. 

Does using defaults.css faster than setting default styles via a static
initialization? (Since defaults.css is compiled; I figure it is but not
sure).

In defaults.css there doesn't seem to be a way to specify stroke styles. Is
there a way to specify stroke styles via defaults.css besides remove stroke
and stick to basic color/weight/font etc. that is supported in defaults.css.

Thanks,
pn



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/defaults-css-vs-static-initialization-of-styles-tp7383.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.