Runtime Style Modules
Say you have a set of images that collectively, via CSS, determine the skin of your application, as in Example 7-2.
Example 7-2. Sample CSS file
/* styles.css */ Application { background-image:Embed("assets/background.png") ; background-size:"100%" ; } .arrowLeft { skin: Embed("assets/arrow_right.png") ; over-skin: Embed("assets/arrow_right_rollover.png") ; down-skin: Embed("assets/arrow_right_down.png") ; } .arrowRight { skin: Embed("assets/arrow_left.png") ; over-skin: Embed("assets/arrow_left_rollover.png") ; down-skin: Embed("assets/arrow_left_down.png") ; } .tileStyle { skin: Embed("assets/tile.png") ; over-skin: Embed("assets/tile_rollover.png") ; down-skin: Embed("assets/tile_rollover.png") ; } .minimizeStyle{ skin: Embed("assets/minimizeall.png") ; over-skin: Embed("assets/minimizeall_rollover.png") ; down-skin: Embed("assets/minimizeall_rollover.png") ; } .restoreStyle { skin: Embed("assets/restoreall.png") ; over-skin: Embed("assets/restoreall_rollover.png") ; down-skin: Embed("assets/restoreall_rollover.png") ; } .saveButtonStyle { skin: Embed("assets/save_gray.png") ; over-skin: Embed("assets/save_rollover.png") ; down-skin: Embed("assets/save_rollover.png") ; } .showPanelButtonDown { skin: Embed("assets/gray_down_small.png") ; over-skin: Embed("assets/rollover_down_small.png") ; down-skin: Embed("assets/rollover_down_small.png") ; } .hidePanels { skin: Embed("assets/hide_panels.png") ; over-skin: Embed("assets/hide_panels_rollover.png") ; down-skin: ...
Get Agile Enterprise Application Development with Flex now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.