From 7ca98fac92ebea54dd558d771ee7109a6d104932 Mon Sep 17 00:00:00 2001
From: Masahiro FUJIMOTO
Date: Tue, 24 Aug 2021 13:17:45 +0900
Subject: Web/CSS/list-style-type を更新 (#2096)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
2021/08/13 時点の英語版に同期
---
files/ja/web/css/list-style-type/index.html | 1073 +++++++++++++--------------
1 file changed, 522 insertions(+), 551 deletions(-)
(limited to 'files/ja/web')
diff --git a/files/ja/web/css/list-style-type/index.html b/files/ja/web/css/list-style-type/index.html
index fb9dfc1575..518ab2a49c 100644
--- a/files/ja/web/css/list-style-type/index.html
+++ b/files/ja/web/css/list-style-type/index.html
@@ -6,23 +6,24 @@ tags:
- CSS プロパティ
- CSS リスト
- Reference
+ - recipe:css-property
+browser-compat: css.properties.list-style-type
translation_of: Web/CSS/list-style-type
---
-{{CSSRef}}
+{{CSSRef}}
-list-style-type は CSS のプロパティで、リスト項目要素のマーカーを設定します (円、文字、独自のカウンタースタイルなど)。
+**`list-style-type`** は [CSS](/ja/docs/Web/CSS) のプロパティで、リスト項目要素のマーカーを設定します (円、文字、独自のカウンタースタイルなど)。
-{{EmbedInteractiveExample("pages/css/list-style-type.html")}}
+{{EmbedInteractiveExample("pages/css/list-style-type.html")}}
-このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 https://github.com/mdn/interactive-examples をクローンしてプルリクエストを送信してください。
+マーカーの[色](/ja/docs/Web/CSS/color_value)は、適用先の要素における色の計算値と同じになります。
-マーカーの色は、適用先の要素における色の計算値と同じになります。
+わずかな要素 ({{HTMLElement("li")}} と {{HTMLElement("summary")}}) だけが既定で `display: list-item` の値を持っています。しかし、 `list-style-type` プロパティは {{cssxref("display")}} の値が `list-item` に設定されているあらゆる要素に適用することができます。さらに、このプロパティは継承されるので、親要素 (普通は {{HTMLElement("ol")}} または {{HTMLElement("ul")}}) に設定することですべてのリスト項目に適用することができます。
-既定で display: list-item の値を持っている要素はわずかです ({{HTMLElement("li")}} と {{HTMLElement("summary")}})。しかし、 list-style-type プロパティは {{cssxref("display")}} の値が list-item に設定されているあらゆる要素に適用することができます。さらに、このプロパティは継承されるので、親要素 (普通は {{HTMLElement("ol")}} または {{HTMLElement("ul")}}) に設定することですべてのリスト項目に適用することができます。
+## 構文
-構文
-
-/* マーカーの種類の一例 */
+```css
+/* マーカーの種類の一例 */
list-style-type: disc;
list-style-type: circle;
list-style-type: square;
@@ -31,10 +32,10 @@ list-style-type: georgian;
list-style-type: trad-chinese-informal;
list-style-type: kannada;
-/* <string> */
+/* の値 */
list-style-type: '-';
-/* @counter-style 規則に該当する識別子 */
+/* @counter-style 規則に一致する識別子 */
list-style-type: custom-counter-style;
/* キーワード値 */
@@ -43,471 +44,202 @@ list-style-type: none;
/* グローバル値 */
list-style-type: inherit;
list-style-type: initial;
+list-style-type: revert;
list-style-type: unset;
-
-
-list-style-type プロパティは、以下のいずれかで定義することができます。
-
-
-
-値
-
-
- - {{cssxref("custom-ident", "<custom-ident>")}}
- - {{cssxref("@counter-style")}} の値、または以下の定義済みスタイルのうちの一つに一致する識別子です。
-
-
-
- - {{cssxref("symbols()")}}
- - 無名のリストスタイルを定義します。
- - {{cssxref("<string>")}}
- - 特定の文字列を、リストのマーカーとして使用します。
- none
- - マーカーは表示されません。
-
-
-
- disc
- -
-
-
- circle
- -
-
-
- square
- -
-
-
- decimal
- -
-
-
- cjk-decimal {{experimental_inline}}
- -
-
- - 漢数字
- - 例: 一, 二, 三, ..., 九八, 九九, 一〇〇
-
-
- decimal-leading-zero
- -
-
- - 数値
- - ゼロ埋めされて表示されます
- - 例: 01, 02, 03, … 98, 99
-
-
- lower-roman
- -
-
- - 小文字のローマ数字
- - 例: i, ii, iii, iv, v…
-
-
- upper-roman
- -
-
- - 大文字のローマ数字
- - 例: I, II, III, IV, V…
-
-
- lower-greek
- -
-
- - 小文字のギリシャ語
- - アルファ、ベータ、ガンマ、…
- - 例: α, β, γ…
-
-
- lower-alpha
- lower-latin
- -
-
- - 小文字の ASCII 文字
- - 例: a, b, c, … z
- lower-latin は IE7 以前は対応していません
- - {{anch("Browser compatibility")}} の節も参照して下さい
-
-
- upper-alpha
- upper-latin
- -
-
- - 大文字の ASCII 文字
- - 例: A, B, C, … Z
- upper-latin は IE7 以前は対応していません
-
-
- arabic-indic
- -moz-arabic-indic
- -
-
-
- armenian
- -
-
- - 伝統的なアルメニア語の数値表記
- - (ayb/ayp, ben/pen, gim/keem…
-
-
- bengali
- -moz-bengali
- -
-
-
- cambodian {{experimental_inline}}*
- -
-
-
- cjk-earthly-branch
- -moz-cjk-earthly-branch
- -
-
-
- cjk-heavenly-stem
- -moz-cjk-heavenly-stem
- -
-
-
- cjk-ideographic{{experimental_inline}}
- -
-
- trad-chinese-informal と同義
- - 例: 一萬一千一百一十一
-
-
- devanagari
- -moz-devanagari
- -
-
-
- ethiopic-numeric {{experimental_inline}}
- -
-
-
- georgian
- -
-
- - 伝統的なジョージア語の数値表記
- - 例: an, ban, gan, … he, tan, in…
-
-
- gujarati
- -moz-gujarati
- -
-
-
- gurmukhi
- -moz-gurmukhi
- -
-
-
- hebrew {{experimental_inline}}
- -
-
-
- hiragana {{experimental_inline}}
- -
-
- - 例: あ, い, う, え, お, か, き…
- - 日本語の「あいうえお」
-
-
- hiragana-iroha {{experimental_inline}}
- -
-
- - 例: い, ろ, は, に, ほ, へ, と…
- - {{interwiki('wikipedia', 'いろは歌')}}は日本語の古い字音の並びです
-
-
- japanese-formal {{experimental_inline}}
- -
-
- - 法的または財務の文書で使用される、日本語の公的な数値表記
- - 例: 壱萬壱阡壱百壱拾壱
- - 似ている別の文字に書き換えられないようにするための漢字
-
-
- japanese-informal {{experimental_inline}}
- -
-
-
- kannada
- -moz-kannada
- -
-
-
- katakana {{experimental_inline}}
- -
-
- - 例: ア, イ, ウ, エ, オ, カ, キ…
- - 日本語の「あいうえお」
-
-
- katakana-iroha {{experimental_inline}}
- -
-
- - 例: イ, ロ, ハ, ニ, ホ, ヘ, ト…
- - {{interwiki('wikipedia', 'いろは歌')}}は日本語の古い字音の並びです
-
-
- khmer
- -moz-khmer
- -
-
-
- korean-hangul-formal {{experimental_inline}}
- -
-
- - 朝鮮のハングルの数値表記
- - 例: 일만 일천일백일십일
-
-
- korean-hanja-formal {{experimental_inline}}
- -
-
- - 公的な朝鮮の漢数字
- - 例: 壹萬 壹仟壹百壹拾壹
-
-
- korean-hanja-informal {{experimental_inline}}
- -
-
-
- lao
- -moz-lao
- -
-
-
- lower-armenian {{experimental_inline}}*
- -
-
-
- malayalam
- -moz-malayalam
- -
-
-
- mongolian {{experimental_inline}}
- -
-
-
- myanmar
- -moz-myanmar
- -
-
-
- oriya
- -moz-oriya
- -
-
-
- persian {{experimental_inline}}
- -moz-persian
- -
-
-
- simp-chinese-formal {{experimental_inline}}
- -
-
- - 公的な簡体字中国語の数値表記
- - 例: 壹万壹仟壹佰壹拾壹
-
-
- simp-chinese-informal {{experimental_inline}}
- -
-
- - 簡体字中国語の日常的な数値表記
- - 例: 一万一千一百一十一
-
-
- tamil {{experimental_inline}}
- -moz-tamil
- -
-
-
- telugu
- -moz-telugu
- -
-
-
- thai
- -moz-thai
- -
-
-
- tibetan {{experimental_inline}}*
- -
-
-
- trad-chinese-formal {{experimental_inline}}
- -
-
- - 公的な繁体字中国語の数値表記
- - 例: 壹萬壹仟壹佰壹拾壹
-
-
- trad-chinese-informal {{experimental_inline}}
- -
-
- - 公的な場では使用しない、繁体字中国語の数値表記
- - 例: 一萬一千一百一十一
-
-
- upper-armenian {{experimental_inline}}*
- -
-
-
- disclosure-open {{experimental_inline}}
- -
-
- - {{HTMLElement("details")}} などの展開ウィジェットを開いていることを示す記号
-
-
- disclosure-closed {{experimental_inline}}
- -
-
- - {{HTMLElement("details")}} などの展開ウィジェットを閉じていることを示す記号
-
-
-
-
-標準外の拡張
-
-Mozilla (Firefox), Blink (Chrome and Opera), WebKit (Safari) が拡張した、様々な言語のマーカーです。ブラウザーの互換性の表で、ブラウザーがどの拡張に対応しているかを確認してください。
-
-
- -moz-ethiopic-halehame
- -
-
-
- -moz-ethiopic-halehame-am
- -
-
-
- ethiopic-halehame-ti-er
- -moz-ethiopic-halehame-ti-er
- -
-
-
- ethiopic-halehame-ti-et
- -moz-ethiopic-halehame-ti-et
- -
-
-
- hangul
- -moz-hangul
- -
-
-
- hangul-consonant
- -moz-hangul-consonant
- -
-
-
- urdu
- -moz-urdu
- -
-
-
-
-
-
+```
+
+`list-style-type` プロパティは、以下のいずれかで定義することができます。
+
+- 単一の `` 値
+- 単一の `symbols()` 値
+- 単一の `` 値
+- キーワード `none`
+
+注意事項:
+
+- 種類によっては期待通りに表示するために適切なフォントのインストールが必要です。
+- `cjk-ideographic` は `trad-chinese-informal` と同じです。歴史的な理由で存在しています。
+
+### 値
+
+- {{cssxref("custom-ident", "<custom-ident>")}}
+ - : {{cssxref("@counter-style")}} の値、または以下の定義済みスタイルのうちの一つに一致する識別子です。
+- {{cssxref("symbols()")}}
+ - : 無名のリストスタイルを定義します。
+- {{cssxref("<string>")}}
+ - : 特定の文字列を、リストのマーカーとして使用します。
+- `none`
+ - : マーカーは表示されません。
+- `disc`
+ - : 塗りつぶされた円形です (既定値)。
+- `circle`
+ - : 中空円です。
+- `square`
+ - : 塗りつぶされた四角形です。
+- `decimal`
+ - : 数値です。 1 から始まります。
+- `cjk-decimal` {{experimental_inline}}
+ - : 漢数字です。
+- `decimal-leading-zero`
+ - : 数値で、先頭がゼロ埋めされます。
+- `lower-roman`
+ - : 小文字のローマ数字です。
+- `upper-roman`
+ - : 大文字のローマ数字です。
+- `lower-greek`
+ - : 小文字の古代ギリシャ文字です。
+- `lower-alpha`, `lower-latin`
+ - : 小文字の ASCII 文字です。
+- `upper-alpha`, `upper-latin`
+ - : 大文字の ASCII 文字です。
+- `arabic-indic`, `-moz-arabic-indic`
+ - : アラビア-インド数字です。
+- `armenian`
+ - : 伝統的なアルメニア語の数値表記です。
+- `bengali`, `-moz-bengali`
+ - : ベンガル語の数値表記です。
+- `cambodian`/`khmer`
+ - : カンボジア/クメール語の数値表記です。
+- `cjk-earthly-branch`, `-moz-cjk-earthly-branch`
+ - : 漢字の「十二支」順です。
+- `cjk-heavenly-stem`, `-moz-cjk-heavenly-stem`
+ - : 漢字の「十干」順です。
+- `cjk-ideographic`{{experimental_inline}}
+ - : `trad-chinese-informal` と同じです。
+- `devanagari`, `-moz-devanagari`
+ - : デーヴァナーガリーの数値表記です。
+- `ethiopic-numeric` {{experimental_inline}}
+ - : エチオピア語の数値表記です。
+- `georgian`
+ - : 伝統的なジョージア語の数値表記です。
+- `gujarati`, `-moz-gujarati`
+ - : グジャラート語の数値表記です。
+- `gurmukhi`, `-moz-gurmukhi`
+ - : グルムキー語の数値表記です。
+- `hebrew` {{experimental_inline}}
+ - : 伝統的なヘブライ語の数値表記です。
+- `hiragana` {{experimental_inline}}
+ - : ひらがなの辞書順の文字です。
+- `hiragana-iroha` {{experimental_inline}}
+ - : ひらがなの{{interwiki('wikipedia', 'いろは歌', 'いろは順')}}の文字です。
+- `japanese-formal` {{experimental_inline}}
+ - : 法律や金融関係の書類に使用される日本の公的な数値表記です。漢字は、他の正しい文字に似せて修正することができないように設計されています。
+- `japanese-informal` {{experimental_inline}}
+ - : 日本語の日常的な数値表記です。
+- `kannada`, `-moz-kannada`
+ - : カンナダ語の数値表記です。
+- `katakana` {{experimental_inline}}
+ - : カタカナの辞書順の文字です。
+- `katakana-iroha` {{experimental_inline}}
+ - : カタカナの{{interwiki('wikipedia', 'いろは歌', 'いろは順')}}の文字です。
+- `korean-hangul-formal` {{experimental_inline}}
+ - : 韓国語のハングルの数値表記です。
+- `korean-hanja-formal` {{experimental_inline}}
+ - : 韓国語の公的な漢数字です。
+- `korean-hanja-informal` {{experimental_inline}}
+ - : 韓国語の漢数字です。
+- `lao`, `-moz-lao`
+ - : ラオス語の数値表記です。
+- `lower-armenian` {{experimental_inline}}
+ - : アルメニア語の小文字の数値表記です。
+- `malayalam`, `-moz-malayalam`
+ - : マラヤーラム語の数値表記です。
+- `mongolian` {{experimental_inline}}
+ - : モンゴル語の数値表記です。
+- `myanmar`, `-moz-myanmar`
+ - : ミャンマー語 (ビルマ語) の数値表記です。
+- `oriya`, `-moz-oriya`
+ - : オリヤー語の数値表記です。
+- `persian` {{experimental_inline}}, `-moz-persian`
+ - : ペルシャ語の数値表記です。
+- `simp-chinese-formal` {{experimental_inline}}
+ - : 公的な簡体字中国語の数値表記です。
+- `simp-chinese-informal` {{experimental_inline}}
+ - : 日常的な簡体字中国語の数値表記です。
+- `tamil` {{experimental_inline}}, `-moz-tamil`
+ - : タミル語の数値表記です。
+- `telugu`, `-moz-telugu`
+ - : テルグ語の数値表記です。
+- `thai`, `-moz-thai`
+ - : タイ語の数値表記です。
+- `tibetan` {{experimental_inline}}\*
+ - : チベット語の数値表記です。
+- `trad-chinese-formal` {{experimental_inline}}
+ - : 公的な繁体字中国語の数値表記です。
+- `trad-chinese-informal` {{experimental_inline}}
+ - : 日常的な繁体字中国語の数値表記です。
+- `upper-armenian` {{experimental_inline}}`
+ - : 伝統的なアルメニア語の大文字の数値表記です。
+- `disclosure-open` {{experimental_inline}}
+ - : {{HTMLElement("details")}} などの展開ウィジェットを開いていることを示す記号
+- `disclosure-closed` {{experimental_inline}}
+ - : {{HTMLElement("details")}} などの展開ウィジェットを閉じていることを示す記号
+
+### 標準外の拡張
+
+Mozilla (Firefox)、Blink (Chrome、Opera)、WebKit (Safari) では、他の言語のリストの種類に対応するために、さらにいくつかの定義済みの種類が提供されています。どのブラウザーがどの拡張に対応しているかを確認するには、互換性一覧表を参照してください。
+
+- `-moz-ethiopic-halehame`
+- `-moz-ethiopic-halehame-am`
+- `ethiopic-halehame-ti-er`, `-moz-ethiopic-halehame-ti-er`
+- `ethiopic-halehame-ti-et`, `-moz-ethiopic-halehame-ti-et`
+- `hangul`, `-moz-hangul`
+- `hangul-consonant`, `-moz-hangul-consonant`
+- `urdu`, `-moz-urdu`
+
+## アクセシビリティの考慮
+
+画面リーダーの [VoiceOver](https://help.apple.com/voiceover/info/guide/) には、 `list-style-type` の値に `none` が適用された順序なしリストをリストとして読み上げないという問題があります。リストが正しく読み上げられるようにするには、それぞれのリスト項目の前に[幅ゼロの空白](https://en.wikipedia.org/wiki/Zero-width_space)を[擬似コンテンツ](/ja/docs/Web/CSS/content)として追加する必要があります。これはデザインがバグ修正に影響されないことを保証し、リスト項目の表記が正しくなくなるわけではありません。
+
+```css
+ul {
+ list-style: none;
+}
+
+ul li::before {
+ content: "\200B";
+}
+```
+
+- [VoiceOver and list-style-type: none – Unfettered Thoughts](https://unfetteredthoughts.net/2017/09/26/voiceover-and-list-style-type-none/)
+- [MDN WCAG の理解、ガイドライン 1.3 の説明](/ja/docs/Web/Accessibility/Understanding_WCAG/Perceivable#Guideline_1.3_%E2%80%94_Create_content_that_can_be_presented_in_different_ways)
+- [Understanding Success Criterion 1.3.1 | W3C Understanding WCAG 2.0](https://www.w3.org/TR/UNDERSTANDING-WCAG20/content-structure-separation-programmatic.html)
+
+## 公式定義
+
+{{cssinfo}}
+
+## 形式文法
{{csssyntax}}
-例
+## 例
+
+リスト項目マーカーの設定
+
+#### HTML
-CSS
+```html
+List 1
+
+ - Hello
+ - World
+ - What's up?
+
-ol.normal {
+List 2
+
+ - Looks
+ - Like
+ - The
+ - Same
+
+```
+
+#### CSS
+
+```css
+ol.normal {
list-style-type: upper-alpha;
}
@@ -515,96 +247,335 @@ list-style-type: unset;
ol.shortcut {
list-style: upper-alpha;
}
-
+```
-HTML
+#### 結果
-<ol class="normal">List 1
- <li>Hello</li>
- <li>World</li>
- <li>What's up?</li>
-</ol>
+{{EmbedLiveSample("Setting_list_item_markers","200","300")}}
-<ol class="shortcut">List 2
- <li>Looks</li>
- <li>Like</li>
- <li>The</li>
- <li>Same</li>
-</ol>
-
+リストスタイルのすべての種類
-結果
+#### HTML
-{{EmbedLiveSample("Examples","200","300")}}
+```html
+
+ - Apollo
+ - Hubble
+ - Chandra
+ - Cassini-Huygens
+ - Spitzer
+
-アクセシビリティの考慮事項
+Choose a list style type:
-読み上げソフトの VoiceOver には、 list-style-type の値に none が適用された順序なしリストをリストとして読み上げないという問題があります。リストが正しく読み上げられるようにするには、それぞれのリスト項目の前に幅ゼロの空白を擬似コンテンツとして追加する必要があります。これはデザインがバグ修正に影響されないことを保証し、リスト項目の表記が正しくなくなるわけではありません。
+
+```
+
+#### CSS
+
+```css
+
+ol {
+ font-size: 1.2rem;
}
-ul li::before {
- content: "\200B";
+.container {
+ column-count: 3;
+}
+
+label {
+ display: block;
+}
+
+input {
+ margin: .4rem;
}
+```
+
+#### JavaScript
+
+```js
+const container = document.querySelector(".container");
+container.addEventListener("change", event => {
+ const list = document.querySelector("ol");
+ list.setAttribute("style", `list-style-type: ${event.target.value}`);
+});
+```
+
+#### 結果
+
+{{EmbedLiveSample("All_list_style_types", "600", "800")}}
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
-
-
-
-
-メモ
-
-
- - 一部の
list-style-types の表示には、適切なフォントのインストールが必要です。
- cjk-ideographic は trad-chinese-informal と同義です。後方互換性のために残されています。
-
-
-仕様書
-
-
-
-
- | 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- | {{SpecName('CSS3 Counter Styles', '#extending-css2', 'list-style-type')}} |
- {{Spec2("CSS3 Counter Styles")}} |
- CSS2.1 counters を再定義。
- @counter-style 規則に対応するため構文を拡張。
- @counter-style を使用して、一般的なスタイルである hebrew, cjk-ideographic, hiragana, hiragana-iroha, katakana, katakana-iroha, japanese-formal, japanese-informal, simp-chinese-formal, trad-chinese-formal, simp-chinese-formal, trad-chinese-formal,korean-hangul-formal, korean-hanja-informal, korean-hanja-formal, cjk-decimal, ethiopic-numeric, disclosure-open, disclosure-closed を定義。
- <counter-style> を symbols() 表記で拡張。 |
-
-
- | {{SpecName('CSS3 Lists', '#propdef-list-style-type', 'list-style-type')}} |
- {{Spec2('CSS3 Lists')}} |
- {{cssxref("<string>")}} の対応を追加し、 @counter-style 規則で使われる識別子をキーワードに追加。
- 単純な <string> の対応を追加。 |
-
-
- | {{SpecName('CSS2.1', 'generate.html#propdef-list-style-type', 'list-style-type')}} |
- {{Spec2('CSS2.1')}} |
- 初回定義 |
-
-
-
-
-{{cssinfo}}
-
-ブラウザーの互換性
-
-{{Compat("css.properties.list-style-type")}}
-
-関連情報
-
-
- - {{Cssxref("list-style")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}
-
+- {{Cssxref("list-style")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}
--
cgit v1.2.3-54-g00ecf