| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx"> |
| |
| <fx:Style> |
| @namespace s "library://ns.adobe.com/flex/spark"; |
| @namespace mx "library://ns.adobe.com/flex/mx"; |
| |
| s|ButtonBar s|ToggleButton:upAndSelected, |
| s|ButtonBar s|ToggleButton:overAndSelected, |
| s|ButtonBar s|ToggleButton:downAndSelected, |
| |
| s|ButtonBar s|ToggleButton:disabledAndSelected { |
| baseColor: #FF6633; |
| color: #FFFFCC; |
| } |
| |
| s|ButtonBar { |
| baseColor: #FFFFCC; |
| } |
| |
| s|Button { |
| baseColor: #000000; |
| color: #269d6c; |
| } |
| |
| s|VGroup s|Label { |
| fontWeight: "bold"; |
| color: #336699; |
| } |
| |
| s|VGroup mx|Text { |
| color: #0A436B; |
| fontWeight: "bold"; |
| } |
| </fx:Style> |
| |
| <s:Panel title="Advanced CSS: Descendant Selector Example" height="100%" width="100%"> |
| |
| <s:layout> |
| <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/> |
| </s:layout> |
| |
| <s:Group width="50%" height="50%"> |
| <s:ButtonBar id="viewMenu" requireSelection="true" x="10" y="10"> |
| <s:dataProvider> |
| <mx:ArrayCollection source="['Home', 'Events', 'Rooms', 'Dining']" /> |
| </s:dataProvider> |
| </s:ButtonBar> |
| <s:Button label="Click Me!" x="12" y="48"/> |
| <s:Label x="10" y="90" text="Only text in the VGroup below has bold content." /> |
| <s:VGroup x="10" y="109"> |
| <s:Label text="This text component has the style setting referring to the Spark Label component." /> |
| <mx:Text text="This text component has a style setting with a reference to a Halo Text component."/> |
| </s:VGroup> |
| </s:Group> |
| <s:Label width="200" text="Descendant selectors can be used to specifically qualify the component you |
| want to style via the namespace and component. See the Style settings in the code for reference." x="440" y="10"/> |
| </s:Panel> |
| </s:Module> |