blob: 26ac8c6539353ddcca3966db682fa20c4ae2484f [file] [log] [blame]
<?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 "library://ns.adobe.com/flex/spark";
List.blueTheme {
selectionColor: #7FACF6;
}
List.greenTheme {
selectionColor: #00CF3F;
}
Panel.blueTheme {
contentBackgroundColor: #9abbdc;
}
.blueTheme {
focusColor: #3D73EF;
symbolColor: #2A3982;
}
</fx:Style>
<s:Panel title="Advanced CSS: Type+Class Selector Sample" height="100%" width="100%" styleName="blueTheme">
<s:layout>
<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
</s:layout>
<s:Label width="270" text="This Panel has a styleName, but the Lists and Panel have some different styles defined in a Type+Class selector. See the style section for the styles applied."/>
<s:ComboBox selectedIndex="0">
<s:ArrayCollection source="[Monday,Tuesday,Wednesday,Thursday,Friday]"/>
</s:ComboBox>
<s:VGroup horizontalCenter="0" top="8">
<s:Label text="Text:"/>
<s:TextInput text="some text" styleName="blueTheme"/>
<s:Label text="Units:"/>
<s:NumericStepper styleName="blueTheme"/>
<s:List id="carList" selectedIndex="2" styleName="blueTheme">
<s:dataProvider>
<mx:ArrayCollection source="[Civic, M3, Prius, Blazer, Tahoe]" />
</s:dataProvider>
</s:List>
</s:VGroup>
<s:List id="fruitList" selectedIndex="2" styleName="greenTheme">
<s:dataProvider>
<mx:ArrayCollection source="[Apples,Bananas,Grapes]" />
</s:dataProvider>
</s:List>
</s:Panel>
</s:Module>