简体   繁体   中英

Difference b/w Skins and CSS themes in Flash Builder

my question consists of tow parts

**1- why we need skins for every elements if we can style our application using CSS file. for example in theme Graphite in SDK's Sample consists of both CSS+.fla and skins---.mxml files.

2- How we can create a whole theme with out coding CSS.**

1) Skins and CSS serve different purposes. Skins do the actual programmatic drawing of the graphic elements, while css styles allow you to customize certain variables in those skins. For example, the halo skins use the borderStyle, borderColor styles to allow the user to use the same skin on multiple components, and allow the developer to make subtle changes w/o creating new skin files. So while you could create a theme w/o overriding the default skins, or have a theme that's just skins, you're really best served by having both. For example, an application I'm currently building has many instances of the same button style, but all the buttons are different styles. For this button, I wrote a base button skin that accepted a backgroundColor parameter, and using this backgroundColor parameter, i was able to create different coloured buttons with similar appearances.

2) Write skins with default or hard coded values. Not sure why you'd want to do this though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM