1つ前の投稿を書いてから「Specific component with style name」はいったい・・・と思って、adobe labsのFlex 3 フォーラムで聞いてみたところ、Flex Builder TeamのGregさんから返答がありました。

The “Specific component with style name” acts as a hint to CSS Design View and serves to document the purpose of the style. However, Flex itself ignores the component name portion of the name.

So, if you have Label.myLabel{} in a css file and open that file in CSS Design View, you will see a preview of that style with a Label as the sample component. If you have just myLabel{}, CSS Design View will not know what to use as the sample component, so you would need to select the sample component from the combo box at the top of CSS Design View.

In the MXML source code, Flex considers Label.myLabel and myLabel to be the same thing. This is a limitation of Flex and the MXML compiler. It ignores all characters before the dot in the style name.

So, the Label.myLabel syntax is only useful in Flex Builder CSS Design View. It saves you from having to select Label as the sample component. We also consider it to be a good practice because it makes it clear from the name that the style is intended for use with a Label and not some other kinds of components.

– Greg Dow
– Adobe Flex Builder Team

 

TypeセレクタとClassセレクタがくっついたLabel.myLabel{…….} みたいなのはCSS Design Viewのみで意味ある書き方で、プレビューするコンポーネントを指定できるだけという事みたいです。
あと、スタイル名でドットの前はFlex・MXMLコンパイラで無視されるって書いてますね。

 

Related posts