<style>要素
ネームスペース: http://xmlns.oracle.com/uix/style

<style>要素は、特定のセレクタまたは名前に関連付けられるスタイル・プロパティのセットを定義します。

構文
<style
    [ name="string" ]
    [ selector="string" ]
>
     <!-- The following child can be anything derived from the given element -->
   <property></property>
     <!-- The following child can be anything derived from the given element -->
   <compoundProperty></compoundProperty>
     <!-- The following child can be anything derived from the given element -->
   <includeStyle></includeStyle>
     <!-- The following child can be anything derived from the given element -->
   <includeProperty></includeProperty>
</style>

注意:

説明

<style>要素は、セレクタまたは名前によって識別されるスタイル・プロパティのグループを定義します。 セレクタを指定するスタイルは、XSS文書から生成される任意のCSSスタイルシートに含められます。 名前によって識別されるスタイルは、生成されるCSSスタイルシートには含められません。 そのかわり、名前付きスタイルを使用すると、セレクタベースの多くのスタイルで共有できる共通のスタイル・プロパティの論理表現を提供できます。


次のセレクタベースのスタイルでは、.OraInstructionTextというスタイルのプロパティを定義します。

            <style selector=".OraInstructionText">
              <property name="font-family">Arial,sans-serif</property>
              <property name="font-size">10pt</property>
              <property name="color">#000000</property>
            </style>

この<style>要素は、selector属性を定義しているため、XSS文書から生成されるすべてのCSSスタイルシートに含められます。 上で定義した.OraInstructionTextスタイルから生成されるCSSスタイルのルールは、次のとおりです。

            .OraInstructionText {
               
               font-size:10pt;
               color:#000000
               }
          

名前付きスタイルは、セレクタベースの複数のスタイル間で共有される共通プロパティの定義に使用できます。 たとえば、次の名前付きスタイルはフォント・プロパティを定義しますが、.OraInstructionTextスタイルのみでなく、他のスタイルでも使用できます。

            <style name="DefaultFont">
              <property name="font-family">Arial,sans-serif</property>
              <property name="font-size">10pt</property>
            </style>

名前付きスタイルは、生成されるCSSスタイルシートには含められませんが、<includeStyle>要素または<includeProperty>要素を使用すると、セレクタベースのスタイルで参照できます。 たとえば、.OraInstructionTextスタイルを次のように書き換えることができます。

            <style selector=".OraInstructionText">
              <includeStyle name="DefaultFont">
              <property name="color">#000000</property>
            </style>

他の任意のスタイルでもDefaultFontという名前のスタイルを参照できます。 この方法を使用すると、スタイルシートを設計する際にスタイル・プロパティを重複して定義する必要がなくなります。 また、名前付きスタイルに加えた変更は、そのスタイルを参照するすべてのスタイルへ自動的に反映されるため、カスタマイズのプロセスも簡略化できます。


属性

説明
name このスタイルの名前。 名前付きスタイルのプロパティは、<includeStyle>要素または<includeProperty>要素を使用して他のスタイルで使用できます。 セレクタではなく名前を指定したスタイルは、生成されるCSSスタイルシートには含められません。
string
selector このスタイルのセレクタ。 任意の有効なCSSセレクタを指定できます。 セレクタを指定したスタイルは、生成されるCSSスタイルシートに含められます。
string

子要素

説明 必須 組込み可能な数
<property>
<property>要素は、スタイルの1つのプロパティを定義します。
いいえ
<compoundProperty>
<compoundProperty>要素は、複数の値を含めることができるリストベースのプロパティを定義します。
いいえ
<includeStyle>
<includeStyle>要素は、あるスタイルのすべてのプロパティを別のスタイルに含めます。
いいえ
<includeProperty>
<includeProperty>要素は、あるスタイルの1つのプロパティを別のスタイルに含めます。
いいえ