From 17cd5fb06a1e70c389225fbecf0a0cf29680855c Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 2 Jan 2022 20:00:34 +0900 Subject: CSS の主要概念の文書を変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/computed_value/index.html | 59 ------------------------------ files/ja/web/css/computed_value/index.md | 59 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 files/ja/web/css/computed_value/index.html create mode 100644 files/ja/web/css/computed_value/index.md (limited to 'files/ja/web/css/computed_value') diff --git a/files/ja/web/css/computed_value/index.html b/files/ja/web/css/computed_value/index.html deleted file mode 100644 index f08509b8d0..0000000000 --- a/files/ja/web/css/computed_value/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: 計算値 -slug: Web/CSS/computed_value -tags: - - CSS - - Guide - - Reference - - リファレンス -translation_of: Web/CSS/computed_value ---- -
{{cssref}}
- -

CSS の プロパティの計算値 (computed value) は、継承の過程で親から子へ伝えられる値です。これは指定値から計算されます。

- -
    -
  1. 特殊な値である {{cssxref("inherit")}}, {{cssxref("initial")}}, {{cssxref("unset")}}, {{cssxref("revert")}} を扱います。
  2. -
  3. プロパティの概要の「計算値」に記載された値に達するのに必要な計算を行います。
  4. -
- -

プロパティの計算値に達するのに必要な計算は、一般に (em の単位やパーセントなどの) 相対値を絶対値に変換する計算を含みます。例えば、ある要素に font-size: 16pxpadding-top: 2em が指定された場合、 padding-top の計算値は 32px (フォントサイズの倍) になります。

- -

しかしながら、いくつかのプロパティ (width, margin-right, text-indent, top など、レイアウトの定義に必要ものに対する割合が相対的なもの) でパーセント指定された値はパーセント計算された値に変わります。さらに、 line-height に指定された単位なしの値は、指定された計算値になります。これらの計算値に残った相対的な値は、使用値が定義された場合、絶対値になります。

- -
-

注: DOM の {{domxref("Window.getComputedStyle", "getComputedStyle()")}} API は解決値を返しますが、これはプロパティによって計算値であるか使用値であるかが変わります。

-
- -

仕様書

- - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("CSS2.2", "cascade.html#computed-value", "computed-value")}}{{Spec2("CSS2.2")}} -

変更なし

-
{{SpecName("CSS2.1", "cascade.html#computed-value", "computed value")}}{{Spec2("CSS2.1")}}初回定義
- -

関連情報

- - diff --git a/files/ja/web/css/computed_value/index.md b/files/ja/web/css/computed_value/index.md new file mode 100644 index 0000000000..f08509b8d0 --- /dev/null +++ b/files/ja/web/css/computed_value/index.md @@ -0,0 +1,59 @@ +--- +title: 計算値 +slug: Web/CSS/computed_value +tags: + - CSS + - Guide + - Reference + - リファレンス +translation_of: Web/CSS/computed_value +--- +
{{cssref}}
+ +

CSS の プロパティの計算値 (computed value) は、継承の過程で親から子へ伝えられる値です。これは指定値から計算されます。

+ +
    +
  1. 特殊な値である {{cssxref("inherit")}}, {{cssxref("initial")}}, {{cssxref("unset")}}, {{cssxref("revert")}} を扱います。
  2. +
  3. プロパティの概要の「計算値」に記載された値に達するのに必要な計算を行います。
  4. +
+ +

プロパティの計算値に達するのに必要な計算は、一般に (em の単位やパーセントなどの) 相対値を絶対値に変換する計算を含みます。例えば、ある要素に font-size: 16pxpadding-top: 2em が指定された場合、 padding-top の計算値は 32px (フォントサイズの倍) になります。

+ +

しかしながら、いくつかのプロパティ (width, margin-right, text-indent, top など、レイアウトの定義に必要ものに対する割合が相対的なもの) でパーセント指定された値はパーセント計算された値に変わります。さらに、 line-height に指定された単位なしの値は、指定された計算値になります。これらの計算値に残った相対的な値は、使用値が定義された場合、絶対値になります。

+ +
+

注: DOM の {{domxref("Window.getComputedStyle", "getComputedStyle()")}} API は解決値を返しますが、これはプロパティによって計算値であるか使用値であるかが変わります。

+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS2.2", "cascade.html#computed-value", "computed-value")}}{{Spec2("CSS2.2")}} +

変更なし

+
{{SpecName("CSS2.1", "cascade.html#computed-value", "computed value")}}{{Spec2("CSS2.1")}}初回定義
+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf