aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/cssstyledeclaration/parentrule
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-07-18 23:58:20 +0900
committerGitHub <noreply@github.com>2021-07-18 23:58:20 +0900
commit52c12c1c3a8a92091f5caadf2cd1cc632b345d39 (patch)
tree424efe84033a7527208833211a8d89ca8210abbb /files/ja/web/api/cssstyledeclaration/parentrule
parent2a6500fa9b98c7b57305b14744fea66a58724291 (diff)
downloadtranslated-content-52c12c1c3a8a92091f5caadf2cd1cc632b345d39.tar.gz
translated-content-52c12c1c3a8a92091f5caadf2cd1cc632b345d39.tar.bz2
translated-content-52c12c1c3a8a92091f5caadf2cd1cc632b345d39.zip
Web/API/CSSStyleDeclaration 以下を更新 (#1482)
* Web/API/CSSStyleDeclaration/cssText を新規翻訳 2021/06/13 時点の英語版に基づき新規翻訳 * Web/API/CSSStyleDeclaration 以下を整備 Web/API/CSSStyleDeclaration 以下について、2021/07/10時点の内容に同期。未翻訳の記事については新規翻訳
Diffstat (limited to 'files/ja/web/api/cssstyledeclaration/parentrule')
-rw-r--r--files/ja/web/api/cssstyledeclaration/parentrule/index.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/files/ja/web/api/cssstyledeclaration/parentrule/index.html b/files/ja/web/api/cssstyledeclaration/parentrule/index.html
new file mode 100644
index 0000000000..d8def05ea5
--- /dev/null
+++ b/files/ja/web/api/cssstyledeclaration/parentrule/index.html
@@ -0,0 +1,38 @@
+---
+title: CSSStyleDeclaration.parentRule
+slug: Web/API/CSSStyleDeclaration/parentRule
+tags:
+- API
+- CSSOM
+- Property
+- Reference
+browser-compat: api.CSSStyleDeclaration.parentRule
+translation_of: Web/API/CSSStyleDeclaration/parentRule
+---
+<p>{{ APIRef("CSSOM") }}</p>
+
+<p><span class="seoSummary"><strong>CSSStyleDeclaration.parentRule</strong> は読み取り専用のプロパティで、このスタイルブロックの親である {{domxref('CSSRule')}} を返します。</span>例えば、 CSS セレクターのスタイルを表す {{domxref('CSSStyleRule')}} です。</p>
+
+<h2 id="Syntax">構文</h2>
+
+<pre class="brush: js">var <em>rule</em> = <em>styles</em>.parentRule;</pre>
+
+<h3 id="Value">値</h3>
+
+<p>この宣言ブロックを含む CSS 規則、またはこの {{domxref('CSSStyleDeclaration')}} が {{domxref('CSSRule')}} に割り当てられていない場合は <code>null</code> を返します。</p>
+
+<h2 id="Example">例</h2>
+
+<p>次の JavaScript コードは、 {{domxref('CSSStyleDeclaration')}} から親の CSS スタイル規則を取得します。</p>
+
+<pre class="brush: js">var declaration = document.styleSheets[0].rules[0].style;
+var rule = declaration.parentRule;
+</pre>
+
+<h2 id="Specifications">仕様書</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">ブラウザーの互換性</h2>
+
+<p>{{Compat}}</p>