aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/hanging-punctuation/index.html
blob: 70081210b60bc014d056785777b6b3b2a640b149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
title: hanging-punctuation
slug: Web/CSS/hanging-punctuation
tags:
  - CSS
  - CSS Property
  - CSS Text
  - CSS テキスト
  - CSS プロパティ
  - Experimental
  - Reference
  - リファレンス
translation_of: Web/CSS/hanging-punctuation
---
<div>{{CSSRef}}</div>

<p><span class="seoSummary"><strong><code>hanging-punctuation</code></strong><a href="/ja/docs/Web/CSS">CSS</a> のプロパティで、区切り記号をテキストの行頭や行末にぶら下げるべきかどうかを指定します。ぶら下げられる区切り記号は行ボックスの外側に配置されれることがあります。</span></p>

<pre class="brush:css no-line-numbers notranslate">/* キーワード値 */
hanging-punctuation: none;
hanging-punctuation: first;
hanging-punctuation: last;
hanging-punctuation: force-end;
hanging-punctuation: allow-end;

/* 2 つのキーワード */
hanging-punctuation: first force-end;
hanging-punctuation: first allow-end;
hanging-punctuation: first last;
hanging-punctuation: last force-end;
hanging-punctuation: last allow-end;

/* 3 つのキーワード */
hanging-punctuation: first force-end last;
hanging-punctuation: first allow-end last;

/* グローバル値 */
hanging-punctuation: inherit;
hanging-punctuation: initial;
hanging-punctuation: unset;
</pre>

<p>{{CSSInfo}}</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<p><code>hanging-punctuation</code> プロパティは 1 つ、2 つ、 3 つの値で指定することができます。</p>

<ul>
 <li><strong>値1つ</strong>の構文は、下記の値リストのキーワード値のいずれか 1 つを使用します。</li>
 <li><strong>値2つ</strong>の構文は、次のうち 1 つを使用します。
  <ul>
   <li><code>first</code> と併せて、<code>last</code>, <code>allow-end</code>, <code>force-end</code> のいずれか</li>
   <li><code>last</code> と併せて、<code>first</code>, <code>allow-end</code>, <code>force-end</code> のいずれか</li>
  </ul>
 </li>
 <li><strong>値3つ</strong>の構文は、次のうち 1 つを使用します。
  <ul>
   <li><code>first</code>, <code>allow-end</code>, <code>last</code></li>
   <li><code>first</code>, <code>force-end</code>, <code>last</code></li>
  </ul>
 </li>
</ul>

<h3 id="Values" name="Values"></h3>

<dl>
 <dt><code>none</code></dt>
 <dd>文字のぶら下げを行いません。</dd>
 <dt><code>first</code></dt>
 <dd>要素の最初の書式設定された行頭にある、開き括弧または引用符をぶら下げます。</dd>
 <dt><code>last</code></dt>
 <dd>要素の最後の書式設定された行末にある、閉じ括弧または引用符をぶら下げます。</dd>
 <dt><code>force-end</code></dt>
 <dd>行末の句読点をぶら下げます。</dd>
 <dt><code>allow-end</code></dt>
 <dd>句読点をぶら下げないと行末が揃わない場合に、句読点をぶら下げます。</dd>
</dl>

<h3 id="Formal_syntax" name="Formal_syntax">形式文法</h3>

{{CSSSyntax}}

<h2 id="Example" name="Example"></h2>

<h3 id="HTML">HTML</h3>

<pre class="brush: html notranslate" style="white-space: pre-wrap;">&lt;p&gt;“Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dignissim nunc mauris, et sollicitudin est scelerisque sed. Praesent laoreet tortor massa, sit amet vulputate nulla pharetra ut.”&lt;/p&gt;</pre>

<h3 id="CSS">CSS</h3>

<pre class="brush: css notranslate">p {
  hanging-punctuation: first last;
  margin: .5rem;
}</pre>

<h3 id="Result" name="Result">結果</h3>

<p>{{EmbedLiveSample("Example")}}</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 Text", "#hanging-punctuation-property", "hanging-punctuation")}}</td>
   <td>{{Spec2("CSS3 Text")}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>

<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>

<p>{{Compat("css.properties.hanging-punctuation")}}</p>