aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/padding-block/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/css/padding-block/index.md')
-rw-r--r--files/ja/web/css/padding-block/index.md107
1 files changed, 48 insertions, 59 deletions
diff --git a/files/ja/web/css/padding-block/index.md b/files/ja/web/css/padding-block/index.md
index 521456f937..f4a6d527b1 100644
--- a/files/ja/web/css/padding-block/index.md
+++ b/files/ja/web/css/padding-block/index.md
@@ -4,68 +4,73 @@ slug: Web/CSS/padding-block
tags:
- CSS
- padding-block
- - 'recipe:css-shorthand-property'
+ - recipe:css-shorthand-property
+browser-compat: css.properties.padding-block
translation_of: Web/CSS/padding-block
---
-<div>{{CSSRef}}</div>
+{{CSSRef}}
-<p><strong><code>padding-block</code></strong> は <a href="/ja/docs/Web/CSS" title="CSS">CSS</a> の<a href="/ja/docs/Web/CSS/Shorthand_properties">一括指定プロパティ</a>で、論理的なブロック方向の先頭と末尾のパディングを設定します。これは要素の書字方向やテキストの向きに応じて物理的なパディングに変換されます。</p>
+**`padding-block`** は [CSS](/ja/docs/Web/CSS) の[一括指定プロパティ](/ja/docs/Web/CSS/Shorthand_properties)で、論理的なブロック方向の先頭と末尾のパディングを設定します。これは要素の書字方向やテキストの向きに応じて物理的なパディングに変換されます。
-<pre class="brush:css no-line-numbers notranslate">/* &lt;length&gt; 値 */
+## 構成要素のプロパティ
+
+このプロパティは以下の CSS プロパティの一括指定です。
+
+- {{cssxref("padding-block-end")}}
+- {{cssxref("padding-block-start")}}
+
+## 構文
+
+```css
+/* <length> 値 */
padding-block: 10px 20px; /* 絶対的な長さ */
padding-block: 1em 2em; /* テキストの大きさに対する相対値 */
padding-block: 10px; /* 先頭と末尾の両方を設定 */
-/* &lt;percentage&gt; 値 */
+/* <percentage> 値 */
padding-block: 5% 2%; /* 直近のブロックコンテナーの幅に対する相対値 */
/* グローバル値 */
padding-block: inherit;
padding-block: initial;
+padding-block: revert;
padding-block: unset;
-</pre>
+```
-<h2 id="Constituent_properties" name="Constituent_properties">構成要素のプロパティ</h2>
+`padding-block` プロパティでは、1 つまたは 2 つの値を指定できます。1 つの値が指定された場合は、 {{cssxref("padding-block-start")}} と {{cssxref("padding-block-end")}} の両方の値として使用されます。2 つの値が指定された場合、1 つ目の値が {{cssxref("padding-block-start")}} に、2 つ目の値が {{cssxref("padding-block-end")}} に使用されます。
-<p>このプロパティは以下の CSS プロパティの一括指定です。</p>
+### 値
-<ul>
- <li>{{cssxref("padding-block-end")}}</li>
- <li>{{cssxref("padding-block-start")}}</li>
-</ul>
+`padding-block` プロパティは、 {{CSSxRef("padding-left")}} プロパティと同じ値を取ります。
-<h2 id="Syntax" name="Syntax">構文</h2>
+## 解説
-<h3 id="Values" name="Values">値</h3>
+これらの値は、 {{cssxref("padding-top")}} と {{cssxref("padding-bottom")}}、または {{cssxref("padding-right")}} と {{cssxref("padding-left")}} プロパティに、 {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}} で定義された値に従って対応します。
-<p><code>padding-block</code> プロパティは、 {{CSSxRef("padding-left")}} プロパティと同じ値を取ります。</p>
+## 公式定義
-<h2 id="Description" name="Description">解説</h2>
+{{cssinfo}}
-<p>これらの値は、 {{cssxref("padding-top")}} と {{cssxref("padding-bottom")}}、または {{cssxref("padding-right")}} と {{cssxref("padding-left")}} プロパティに、 {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}} で定義された値に従って対応します。</p>
-
-<h2 id="Formal_definition" name="Formal_definition">公式定義</h2>
-
-<p>{{cssinfo}}</p>
-
-<h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2>
+## 形式文法
{{csssyntax}}
-<h2 id="Examples" name="Examples">例</h2>
+## 例
-<h3 id="Setting_block_padding_for_vertical_text" name="Setting_block_padding_for_vertical_text">縦書きテキストにおけるブロック方向のパディングの設定</h3>
+<h3 id="Setting_block_padding_for_vertical_text">縦書きテキストにおけるブロック方向のパディングの設定</h3>
-<h4 id="HTML">HTML</h4>
+#### HTML
-<pre class="brush: html notranslate">&lt;div&gt;
- &lt;p class="exampleText"&gt;Example text&lt;/p&gt;
-&lt;/div&gt;
-</pre>
+```html
+<div>
+ <p class="exampleText">Example text</p>
+</div>
+```
-<h4 id="CSS">CSS</h4>
+#### CSS
-<pre class="brush: css notranslate">div {
+```css
+div {
background-color: yellow;
width: 120px;
height: 120px;
@@ -75,38 +80,22 @@ padding-block: unset;
writing-mode: vertical-rl;
padding-block: 20px 40px;
background-color: #c8c800;
-}</pre>
+}
+```
-<h4 id="Result" name="Result">結果</h4>
+#### 結果
-<p>{{EmbedLiveSample("Setting_block_padding_for_vertical_text", 140, 140)}}</p>
+{{EmbedLiveSample("Setting_block_padding_for_vertical_text", 140, 140)}}
-<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("CSS Logical Properties", "#propdef-padding-block", "padding-block")}}</td>
- <td>{{Spec2("CSS Logical Properties")}}</td>
- <td>初回定義</td>
- </tr>
- </tbody>
-</table>
+{{Specifications}}
-<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+## ブラウザーの互換性
-<p>{{Compat("css.properties.padding-block")}}</p>
+{{Compat}}
-<h2 id="See_also" name="See_also">関連情報</h2>
+## 関連情報
-<ul>
- <li>対応する物理的プロパティ: {{cssxref("padding-top")}}, {{cssxref("padding-right")}}, {{cssxref("padding-bottom")}}, {{cssxref("padding-left")}}</li>
- <li>{{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}}</li>
-</ul>
+- 対応する物理的プロパティ: {{cssxref("padding-top")}}, {{cssxref("padding-right")}}, {{cssxref("padding-bottom")}}, {{cssxref("padding-left")}}
+- {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}}