I have a Flex 3.2 application for which I am developing a custom style. Basically the first stylesheet gets applied first, and then my custom stylesheet. I am wondering how I can completely empty a value set in the first stylesheet with a value set in the second. The value has to be blank because if the horizontal-center value is set then any other positioning values are ignored. 开发者_如何学CI have attempted null and "" with no luck. Any ideas?
Example
CSS1.css
.myButton {
horizontal-center: 0;
}
CSS2.css
.myButton {
horizontal-center: ??
left: 0;
}
Perhaps what you need is runtime style selection in ActionScript:
StyleManager.setStyleDeclaration("SelectorName", styleName, true);
StyleManager.clearStyleDeclaration("SelectorName", styleName);
Where styleName
is an instance of CSSStyledeclaration
, and SelectorName
would in your case likely be "Button"
See the page for StyleManager in the liveDocs.
精彩评论