Menu

Changes to Style Syntax

Dave Brondsema SourceForge Editorial Staff
There is a newer version of this page. You can find it here.
# Changes to Style Syntax **Closed 12/12/2008** ## Issue Style metadata is declared on components, but the majority of styles are honored by the skin. Do we need a new syntax/mechanism for declaring styles on skins and having them be settable on component tags? Currently, custom style values can only be set on CSS stylesheets. For example, a custom button skin declares a new "fizzle" style. Setting the style directly on the component tag doesn't work: <button skinclass="CustomButtonSkin" fizzle="true"> The workaround is to set the style in a stylesheet: <style> .myStyle { fizzle: true; } </style> </button><button skinclass="CustomButtonSkin" stylename="myStyle"> The other problem with declaring style metadata on components is if a custom skin doesn't support a given style, setting the style attribute has no effect (it doesn't cause any problems, but just doesn't do anything). ## Recommendation Keep the existing mechanism and make no new changes. In Halo, styles were a primary mechanism for visual customization, and every component had numerous style definitions. In Gumbo, styles play a much smaller role. Gumbo components only support text styles and a handful of color styles. Since styling is playing a smaller role, and the number of style properties has been significantly reduced, it's fine to stick with our current mechanism of declaring style metadata on the components. </button>
[[ include ref='flexsdk:flexsdk_rightnav' ]]

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.