aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-11-07 21:38:47 +0900
committerpotappo <potappo@gmail.com>2021-11-20 14:07:22 +0900
commit523f17272ddf4f565504e142fbbf1f98d8fcb94e (patch)
tree63d1e521e6199c883cba62e0cdad87c2421a54bf /files
parent62ed2901fb9efc6e5bbc6ef8013112b3dc6ec22f (diff)
downloadtranslated-content-523f17272ddf4f565504e142fbbf1f98d8fcb94e.tar.gz
translated-content-523f17272ddf4f565504e142fbbf1f98d8fcb94e.tar.bz2
translated-content-523f17272ddf4f565504e142fbbf1f98d8fcb94e.zip
CSS Lists のプロパティを更新
- 2021/11/06 時点の英語版に同期
Diffstat (limited to 'files')
-rw-r--r--files/ja/web/css/list-style-image/index.md142
-rw-r--r--files/ja/web/css/list-style-position/index.md166
-rw-r--r--files/ja/web/css/list-style-type/index.md10
-rw-r--r--files/ja/web/css/list-style/index.md5
4 files changed, 155 insertions, 168 deletions
diff --git a/files/ja/web/css/list-style-image/index.md b/files/ja/web/css/list-style-image/index.md
index cf725c5287..edf758665c 100644
--- a/files/ja/web/css/list-style-image/index.md
+++ b/files/ja/web/css/list-style-image/index.md
@@ -5,109 +5,113 @@ tags:
- CSS
- CSS プロパティ
- CSS リスト
- - Reference
- - list-style
- - list-style-image
+ - リファレンス
+ - recipe:css-property
+browser-compat: css.properties.list-style-image
translation_of: Web/CSS/list-style-image
---
-<div>{{CSSRef}}</div>
+{{CSSRef}}
-<p><a href="/ja/docs/Web/CSS">CSS</a> の <strong><code>list-style-image</code></strong> プロパティは、リスト項目のマーカーとして使われる画像を設定します。</p>
+**`list-style-image`** は [CSS](/ja/docs/Web/CSS) のプロパティで、リスト項目のマーカーとして使われる画像を設定します。
-<p>ふつうは一括指定の {{cssxref("list-style")}} を使うほうが便利です。</p>
+ふつうは一括指定の {{cssxref("list-style")}} を使ったほうが便利です。
-<div>{{EmbedInteractiveExample("pages/css/list-style-image.html")}}</div>
+{{EmbedInteractiveExample("pages/css/list-style-image.html")}}
-<div class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</div>
+> **Note:** このプロパティはリスト項目、つまり、`{{cssxref("display")}}: list-item;` が指定された要素に対して適用されます。[既定では](https://www.w3.org/TR/html5/rendering.html#lists)、 {{HTMLElement("li")}} 要素を含みます。このプロパティは継承されるので、親要素 (通常は {{HTMLElement("ol")}} や {{HTMLElement("ul")}}) に設定することで、すべてのリスト項目に適用することができます。
-<div class="note">
-<p><strong>注:</strong> このプロパティはリスト項目、つまり、 <code>{{cssxref("display")}}: list-item;</code> が指定された要素に対して適用されます。<a href="https://www.w3.org/TR/html5/rendering.html#lists">既定では</a>、 {{HTMLElement("li")}} 要素を含みます。このプロパティは継承されるので、親要素 (通常は {{HTMLElement("ol")}} や {{HTMLElement("ul")}}) に設定することで、すべてのリスト項目に適用することができます。</p>
-</div>
+## 構文
-<h2 id="Syntax" name="Syntax">構文</h2>
-
-<pre class="brush:css no-line-numbers notranslate">/* キーワード値 */
+```css
+/* キーワード値 */
list-style-image: none;
-/* &lt;url&gt; 値 */
+/* <url> 値 */
list-style-image: url('starsolid.gif');
+/* 有効な画像値 */
+list-style-image: linear-gradient(to left bottom, red, blue);
+
/* グローバル値 */
list-style-image: inherit;
list-style-image: initial;
+list-style-image: revert;
list-style-image: unset;
-</pre>
+```
-<h3 id="Values" name="Values">値</h3>
+### 値
-<dl>
- <dt>{{cssxref("&lt;url&gt;")}}</dt>
- <dd>マーカーとして使う画像の場所です。</dd>
- <dt><code>none</code></dt>
- <dd>画像をマーカーとして使用しないことを指定します。この値が設定された場合、代わりに {{ Cssxref("list-style-type") }} で定義されたマーカーが使われます。</dd>
-</dl>
+- {{cssxref("&lt;image&gt;")}}
+ - : マーカーとして使う画像の場所です。
+- `none`
+ - : 画像をマーカーとして使用しないことを指定します。この値が設定された場合、代わりに {{ Cssxref("list-style-type") }} で定義されたマーカーが使われます。
-<h2 id="Formal_definition" name="Formal_definition">公式定義</h2>
+## 公式定義
-<p>{{cssinfo}}</p>
+{{cssinfo}}
-<h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2>
+## 形式文法
{{csssyntax}}
-<h2 id="Examples" name="Examples">例</h2>
+## 例
-<h3 id="Setting_list_item_images" name="Setting_list_item_images">リスト項目の画像の設定</h3>
+<h3 id="Using_a_url_value">url 値の使用</h3>
-<h4 id="HTML">HTML</h4>
+#### HTML
-<pre class="brush: html notranslate">&lt;ul&gt;
- &lt;li&gt;Item 1&lt;/li&gt;
- &lt;li&gt;Item 2&lt;/li&gt;
-&lt;/ul&gt;
-</pre>
+```html
+<ul>
+ <li>Item 1</li>
+ <li>Item 2</li>
+</ul>
+```
-<h4 id="CSS">CSS</h4>
+#### CSS
-<pre class="brush: css notranslate">ul {
- list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif");
-}</pre>
+```css
+ul {
+ list-style-image: url("starsolid.gif");
+}
+```
-<h4 id="Result" name="Result">結果</h4>
+#### 結果
-<p>{{ EmbedLiveSample('Setting_list_item_images') }}</p>
+{{ EmbedLiveSample('Using_a_url_value') }}
-<h2 id="Specifications" name="Specifications">仕様書</h2>
+<h3 id="Using_a_gradient">グラデーションの使用</h3>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">仕様書</th>
- <th scope="col">状態</th>
- <th scope="col">備考</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{ SpecName('CSS3 Lists', '#propdef-list-style-image', 'list-style-image') }}</td>
- <td>{{ Spec2('CSS3 Lists') }}</td>
- <td>すべての {{cssxref("&lt;image&gt;")}} データ型をサポートするように拡張</td>
- </tr>
- <tr>
- <td>{{ SpecName('CSS2.1', 'generate.html#propdef-list-style-image', 'list-style-image') }}</td>
- <td>{{ Spec2('CSS2.1') }}</td>
- <td>初回定義</td>
- </tr>
- </tbody>
-</table>
+#### HTML
-<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+```html
+<ul>
+ <li>Item 1</li>
+ <li>Item 2</li>
+</ul>
+```
-<p>{{Compat("css.properties.list-style-image")}}</p>
+#### CSS
-<h2 id="See_also" name="See_also">関連情報</h2>
+```css
+ul {
+ font-size: 200%;
+ list-style-image: linear-gradient(to left bottom, red, blue);
+}
+```
-<ul>
- <li>{{Cssxref("list-style")}}, {{Cssxref("list-style-type")}}, {{Cssxref("list-style-position")}}</li>
- <li>{{cssxref("url()", "url()")}} 関数</li>
-</ul>
+#### 結果
+
+{{ EmbedLiveSample('Using_a_gradient') }}
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
+
+- {{Cssxref("list-style")}}, {{Cssxref("list-style-type")}}, {{Cssxref("list-style-position")}}
+- {{cssxref("url()", "url()")}} 関数
diff --git a/files/ja/web/css/list-style-position/index.md b/files/ja/web/css/list-style-position/index.md
index 736b5876f4..6e40a21dfb 100644
--- a/files/ja/web/css/list-style-position/index.md
+++ b/files/ja/web/css/list-style-position/index.md
@@ -5,78 +5,85 @@ tags:
- CSS
- CSS プロパティ
- CSS リスト
- - Reference
- - list-style
- - list-style-position
+ - リファレンス
+ - recipe:css-property
+browser-compat: css.properties.list-style-position
translation_of: Web/CSS/list-style-position
---
-<div>{{CSSRef}}</div>
+{{CSSRef}}
-<p><a href="/ja/docs/Web/CSS">CSS</a> の <strong><code>list-style-position</code></strong> プロパティは、リストアイテムに対する {{cssxref("::marker")}} の位置を指定します。</p>
+**`list-style-position`** は [CSS](/ja/docs/Web/CSS) のプロパティで、リスト項目に対する {{cssxref("::marker")}} の位置を指定します。
-<div>{{EmbedInteractiveExample("pages/css/list-style-position.html")}}</div>
+{{EmbedInteractiveExample("pages/css/list-style-position.html")}}
-<p class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</p>
+多くの場合、一括指定の {{cssxref("list-style")}} を使ったほうが便利です。
-<p>多くの場合、一括指定の {{cssxref("list-style")}} を使うほうが便利です。</p>
+> **Note:** このプロパティはリスト項目に対して適用されます。つまり、 `{{cssxref("display")}}: list-item;` が指定された要素です。[既定では](https://www.w3.org/TR/html5/rendering.html#lists)、 {{HTMLElement("li")}} 要素が該当します。このプロパティは継承されるので、親要素 (通常は {{HTMLElement("ol")}} や {{HTMLElement("ul")}}) に設定することで、すべてのリスト項目に適用することができます。
-<p><strong>メモ:</strong> このプロパティはリストアイテムに対して適用されます。つまり、 <code>{{cssxref("display")}}: list-item;</code> が指定された要素です。<a href="https://www.w3.org/TR/html5/rendering.html#lists">既定では</a>、 {{HTMLElement("li")}} 要素を含みます。このプロパティは継承されるので、親要素 (通常は {{HTMLElement("ol")}} や {{HTMLElement("ul")}}) に設定することで、すべてのリストアイテムに適用することができます。</p>
+なお、 `list-style-position: inside` を指定したリスト要素の中で最初にブロック要素が配置された場合、その動作はブラウザーによって異なります。 Chrome と Safari では、この要素はマーカーボックスと同じ行に配置されますが、 Firefox、 Internet Explorer、 Opera では次の行に配置されます。 詳細については {{bug(36854)}} をご覧ください。
-<p><strong>メモ:</strong> <code>list-style-position: inside</code> を指定したリスト要素の中で最初にブロック要素が配置された場合、その動作はブラウザーによって異なります。 Chrome と Safari では、この要素はマーカーボックスと同じ行に配置されますが、 Firefox、 Internet Explorer、 Opera では次の行に配置されます。 詳細については {{bug(36854)}} をご覧ください。</p>
+## 構文
-<h2 id="Syntax" name="Syntax">構文</h2>
-
-<pre class="brush:css no-line-numbers">/* キーワード値 */
+```css
+/* キーワード値 */
list-style-position: inside;
list-style-position: outside;
/* グローバル値 */
list-style-position: inherit;
list-style-position: initial;
+list-style-position: revert;
list-style-position: unset;
-</pre>
+```
+
+`list-style-position` プロパティには、下記の値の中の一つが指定されます。
+
+### 値
-<p><code>list-style-position</code> プロパティには、下記の値の中の一つが指定されます。</p>
+- `inside`
+ - : {{cssxref("::marker")}} はリスト項目の最初の要素として配置されます。
+- `outside`
+ - : {{cssxref("::marker")}} は主要ブロックボックスの外に配置されます。
-<h3 id="Values" name="Values">値</h3>
+## 公式定義
-<dl>
- <dt><code>inside</code></dt>
- <dd>{{cssxref("::marker")}} はリストアイテムの最初の要素として配置されます。</dd>
- <dt><code>outside</code></dt>
- <dd>{{cssxref("::marker")}} は主要ブロックボックスの外に配置されます。</dd>
-</dl>
+{{cssinfo}}
-<h3 id="Formal_syntax" name="Formal_syntax">形式文法</h3>
+## 形式文法
{{csssyntax}}
-<h2 id="Examples" name="Examples">例</h2>
-
-<h3 id="HTML" name="HTML">HTML</h3>
-
-<pre class="brush: html">&lt;ul class="inside"&gt;List 1
- &lt;li&gt;List Item 1-1&lt;/li&gt;
- &lt;li&gt;List Item 1-2&lt;/li&gt;
- &lt;li&gt;List Item 1-3&lt;/li&gt;
- &lt;li&gt;List Item 1-4&lt;/li&gt;
-&lt;/ul&gt;
-&lt;ul class="outside"&gt;List 2
- &lt;li&gt;List Item 2-1&lt;/li&gt;
- &lt;li&gt;List Item 2-2&lt;/li&gt;
- &lt;li&gt;List Item 2-3&lt;/li&gt;
- &lt;li&gt;List Item 2-4&lt;/li&gt;
-&lt;/ul&gt;
-&lt;ul class="inside-img"&gt;List 3
- &lt;li&gt;List Item 3-1&lt;/li&gt;
- &lt;li&gt;List Item 3-2&lt;/li&gt;
- &lt;li&gt;List Item 3-3&lt;/li&gt;
- &lt;li&gt;List Item 3-4&lt;/li&gt;
-&lt;/ul&gt;</pre>
-
-<h3 id="CSS" name="CSS">CSS</h3>
-
-<pre class="brush:css;">.inside {
+## 例
+
+<h3 id="Setting_list_item_position">リスト項目の位置の設定</h3>
+
+#### HTML
+
+```html
+<ul class="inside">List 1
+ <li>List Item 1-1</li>
+ <li>List Item 1-2</li>
+ <li>List Item 1-3</li>
+ <li>List Item 1-4</li>
+</ul>
+<ul class="outside">List 2
+ <li>List Item 2-1</li>
+ <li>List Item 2-2</li>
+ <li>List Item 2-3</li>
+ <li>List Item 2-4</li>
+</ul>
+<ul class="inside-img">List 3
+ <li>List Item 3-1</li>
+ <li>List Item 3-2</li>
+ <li>List Item 3-3</li>
+ <li>List Item 3-4</li>
+</ul>
+```
+
+#### CSS
+
+```css
+.inside {
list-style-position: inside;
list-style-type: square;
}
@@ -88,45 +95,22 @@ list-style-position: unset;
.inside-img {
list-style-position: inside;
- list-style-image: url("https://mdn.mozillademos.org/files/11979/starsolid.gif");
-}</pre>
-
-<h3 id="Result" name="Result">結果</h3>
-
-<p>{{EmbedLiveSample("Examples", 200, 420)}}</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('CSS3 Lists', '#list-style-position-property', 'list-style-position')}}</td>
- <td>{{Spec2('CSS3 Lists')}}</td>
- <td>変更なし</td>
- </tr>
- <tr>
- <td>{{SpecName('CSS2.1', 'generate.html#propdef-list-style-position', 'list-style-position')}}</td>
- <td>{{Spec2('CSS2.1')}}</td>
- <td>初回定義</td>
- </tr>
- </tbody>
-</table>
-
-<p>{{cssinfo}}</p>
-
-<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>
-
-<p>{{Compat("css.properties.list-style-position")}}</p>
-
-<h2 id="See_also" name="See_also">関連情報</h2>
-
-<ul>
- <li>{{Cssxref("list-style")}}, {{Cssxref("list-style-type")}}, {{Cssxref("list-style-image")}}</li>
-</ul>
+ list-style-image: url("starsolid.gif");
+}
+```
+
+#### 結果
+
+{{EmbedLiveSample("Setting_list_item_position", 200, 420)}}
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
+
+- {{Cssxref("list-style")}}, {{Cssxref("list-style-type")}}, {{Cssxref("list-style-image")}}
diff --git a/files/ja/web/css/list-style-type/index.md b/files/ja/web/css/list-style-type/index.md
index 518ab2a49c..7f32b278b8 100644
--- a/files/ja/web/css/list-style-type/index.md
+++ b/files/ja/web/css/list-style-type/index.md
@@ -5,20 +5,20 @@ tags:
- CSS
- CSS プロパティ
- CSS リスト
- - Reference
+ - リファレンス
- recipe:css-property
browser-compat: css.properties.list-style-type
translation_of: Web/CSS/list-style-type
---
{{CSSRef}}
-**`list-style-type`** は [CSS](/ja/docs/Web/CSS) のプロパティで、リスト項目要素のマーカーを設定します (円、文字、独自のカウンタースタイルなど)。</p>
+**`list-style-type`** は [CSS](/ja/docs/Web/CSS) のプロパティで、リスト項目要素のマーカーを設定します (円、文字、独自のカウンタースタイルなど)。
{{EmbedInteractiveExample("pages/css/list-style-type.html")}}
マーカーの[色](/ja/docs/Web/CSS/color_value)は、適用先の要素における色の計算値と同じになります。
-わずかな要素 ({{HTMLElement("li")}} と {{HTMLElement("summary")}}) だけが既定で `display: list-item` の値を持っています。しかし、 `list-style-type` プロパティは {{cssxref("display")}} の値が `list-item` に設定されているあらゆる要素に適用することができます。さらに、このプロパティは継承されるので、親要素 (普通は {{HTMLElement("ol")}} または {{HTMLElement("ul")}}) に設定することですべてのリスト項目に適用することができます。</p>
+わずかな要素 ({{HTMLElement("li")}} と {{HTMLElement("summary")}}) だけが既定で `display: list-item` の値を持っています。しかし、 `list-style-type` プロパティは {{cssxref("display")}} の値が `list-item` に設定されているあらゆる要素に適用することができます。さらに、このプロパティは継承されるので、親要素 (普通は {{HTMLElement("ol")}} または {{HTMLElement("ul")}}) に設定することですべてのリスト項目に適用することができます。
## 構文
@@ -140,7 +140,7 @@ list-style-type: unset;
- : 韓国語の漢数字です。
- `lao`, `-moz-lao`
- : ラオス語の数値表記です。
-- `lower-armenian` {{experimental_inline}}
+- `lower-armenian` {{experimental_inline}}\*
- : アルメニア語の小文字の数値表記です。
- `malayalam`, `-moz-malayalam`
- : マラヤーラム語の数値表記です。
@@ -168,7 +168,7 @@ list-style-type: unset;
- : 公的な繁体字中国語の数値表記です。
- `trad-chinese-informal` {{experimental_inline}}
- : 日常的な繁体字中国語の数値表記です。
-- `upper-armenian` {{experimental_inline}}`
+- `upper-armenian` {{experimental_inline}}\*
- : 伝統的なアルメニア語の大文字の数値表記です。
- `disclosure-open` {{experimental_inline}}
- : {{HTMLElement("details")}} などの展開ウィジェットを開いていることを示す記号
diff --git a/files/ja/web/css/list-style/index.md b/files/ja/web/css/list-style/index.md
index 1cbd6d7f60..af0e998fc1 100644
--- a/files/ja/web/css/list-style/index.md
+++ b/files/ja/web/css/list-style/index.md
@@ -5,7 +5,7 @@ tags:
- CSS
- CSS Lists
- CSS プロパティ
- - Reference
+ - リファレンス
- recipe:css-shorthand-property
browser-compat: css.properties.list-style
translation_of: Web/CSS/list-style
@@ -17,7 +17,6 @@ translation_of: Web/CSS/list-style
{{EmbedInteractiveExample("pages/css/list-style.html")}}
> **Note:** このプロパティはリスト項目、すなわち `{{cssxref("display")}}: list-item;` の要素に適用されます。[既定では](https://www.w3.org/TR/html5/rendering.html#lists) {{HTMLElement("li")}} 要素が含まれます。このプロパティは継承されるので、親要素 (ふつうは {{HTMLElement("ol")}} または {{HTMLElement("ul")}}) に設定すれば、同じリストスタイルを内部のすべての項目に適用できます。
-</div>
## 構成要素のプロパティ
@@ -74,7 +73,7 @@ list-style: unset;
この問題に対処する最も簡単な方法は、明示的に `role="list"` をマークアップ内の `<ul>` 要素に追加することです。これにより、デザインに影響を与えることなく、リストの意味を復元することができます。
-マークアップを変更できない場合の CSS のみの解決策もあります。一つは、それぞれのリスト項目の前に<a href="https://ja.wikipedia.org/wiki/%E3%82%BC%E3%83%AD%E5%B9%85%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9">ゼロ幅スペース</a>を[擬似コンテンツ](/ja/docs/Web/CSS/content)として追加することです。
+マークアップを変更できない場合の CSS のみの解決策もあります。一つは、それぞれのリスト項目の前に[ゼロ幅スペース](https://ja.wikipedia.org/wiki/%E3%82%BC%E3%83%AD%E5%B9%85%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9)を[擬似コンテンツ](/ja/docs/Web/CSS/content)として追加することです。
```css
ul {