diff options
| author | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2022-02-20 19:25:00 +0900 |
|---|---|---|
| committer | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2022-02-28 01:39:00 +0900 |
| commit | 3f2f7b2ae2c408f618286539a62cb75b8cbb11a4 (patch) | |
| tree | da3b1f99ac31ff3f28d67e30109c156eddc04374 /files/ja/web/css/inherit/index.html | |
| parent | 4d994b229e6c678f9e2a20e8ebe986cafe097320 (diff) | |
| download | translated-content-3f2f7b2ae2c408f618286539a62cb75b8cbb11a4.tar.gz translated-content-3f2f7b2ae2c408f618286539a62cb75b8cbb11a4.tar.bz2 translated-content-3f2f7b2ae2c408f618286539a62cb75b8cbb11a4.zip | |
CSS のグローバル値の記事を移行
Diffstat (limited to 'files/ja/web/css/inherit/index.html')
| -rw-r--r-- | files/ja/web/css/inherit/index.html | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/files/ja/web/css/inherit/index.html b/files/ja/web/css/inherit/index.html deleted file mode 100644 index 25f700decc..0000000000 --- a/files/ja/web/css/inherit/index.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: inherit -slug: Web/CSS/inherit -tags: - - CSS - - CSS カスケードと継承 - - CSS 値 - - Cascade - - Inheritance - - Layout - - Reference - - inherit - - カスケード - - スタイル - - 継承 -translation_of: Web/CSS/inherit ---- -<div>{{CSSRef}}</div> - -<p><span class="seoSummary"><strong><code>inherit</code></strong> は CSS のキーワードで、要素のプロパティの<a href="/ja/docs/Web/CSS/computed_value">計算値</a>を親要素から取得するよう指定します。</span> CSS の一括指定 {{cssxref("all")}} を含め、すべての CSS プロパティに適用することができます。</p> - -<p><a href="/ja/docs/Web/CSS/inheritance#Inherited_properties">継承プロパティ</a>においては、既定の動作を推進するものであり、他の規則を上書きする場合にのみ必要です。<a href="/ja/docs/Web/CSS/inheritance#Non-inherited_properties">非継承プロパティ</a>においては、比較的意味の弱い動作をしますので、 {{cssxref("all")}} プロパティには {{cssxref("initial")}} , {{cssxref("unset")}} などを使用した方が良いかもしれません。</p> - -<p>親要素が包含ブロックではなかった場合であっても、常に文書ツリー内の親要素から継承が行われます。</p> - -<h2 id="Example" name="Example">例</h2> - -<pre class="brush: css notranslate">/* 第二レベルのヘッダーを緑色にする */ -h2 { color: green; } - -/* ... ただしサイドバーの中にあるものは、親要素の色を使用する */ -#sidebar h2 { color: inherit; } -</pre> - -<p>この例の中で、サイドバー内にある <code>h2</code> 要素は異なる色になる可能性があります。例えば、以下の規則に一致する div の子であった場合は ...</p> - -<pre class="brush: css notranslate">div#current { color: blue; } -</pre> - -<p>... 青になるでしょう。</p> - -<h2 id="Specifications" name="Specifications">仕様書</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">仕様書</th> - <th scope="col">状態</th> - <th scope="col">備考</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{ SpecName('CSS4 Cascade', '#inherit', 'inherit') }}</td> - <td>{{Spec2('CSS4 Cascade')}}</td> - <td> Level 3 から変更なし。</td> - </tr> - <tr> - <td>{{ SpecName('CSS3 Values', "#common-keywords", "inherit") }}</td> - <td>{{ Spec2('CSS3 Values') }}</td> - <td> {{ SpecName('CSS2.1') }} から重要な変更なし。</td> - </tr> - <tr> - <td>{{ SpecName('CSS2.1', "cascade.html#value-def-inherit", "inherit") }}</td> - <td>{{ Spec2('CSS2.1') }}</td> - <td>初回定義。</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> - -<div> -<p>{{Compat("css.types.global_keywords.inherit")}}</p> -</div> - -<h2 id="See_Also" name="See_Also">関連情報</h2> - -<ul> - <li><a class="internal" href="/ja/docs/Web/CSS/inheritance">継承</a></li> - <li>{{cssxref("initial")}} を使用すると、プロパティを初期値に設定します。</li> - <li>{{cssxref("unset")}} を使用すると、継承プロパティは継承値に、それ以外は初期値に設定します。</li> - <li>{{cssxref("revert")}} を使用すると、プロパティをユーザーエージェントのスタイルシート (又はもしあれば、ユーザーのスタイル) で設定された値に初期化します。</li> - <li>{{cssxref("all")}} プロパティは、すべてのプロパティを一度に initial, inherit, revert, unset の状態にします。</li> -</ul> |
