1. 序論
◎非規範的この~moduleが受持つのは、 ~text装飾 — 一度 植字された~textの~glyphを[ ~font/~typographic ]規則( `CSS-TEXT-3$r, `CSS-FONTS-3$r を見よ)に則って装飾すること — である。 そのような特能は、 伝統的に,純粋な装飾的な目的のみならず,[ 強勢~等を示したり,[ 挿入, 削除, 誤った綴り ]などの編集上の変更点を指示するため ]などに利用される事例もある。 ◎ This module covers text decoration, i.e. decorating the glyphs of the text once typeset according to font and typographic rules. (See [CSS-TEXT-3] and [CSS-FONTS-3].) Such features are traditionally used not only for purely decorative purposes, but also in some cases to show emphasis, for honorifics, and to indicate editorial changes such as insertions, deletions, and misspellings.
`CSS2$r まで【!CSS Levels 1 and 2】は、 西欧~typographic慣習に適切な,ごく基本的な`装飾線$ (下線, 上線, 打消線【!strike-through】) しか定義されなかった。 この~moduleの~level 3 では、 これらの装飾の[ 色, ~style, 位置, 連続性 ]を変更する能を追加したことに加え, `圏点@#emphasis-marks$ (東Asian~typographyにて伝統的に利用されている), `~text影@#text-shadow-property$ (提案されたが~level 2 から先送りされていた) を導入した。 ~level 4 では、 これらの装飾に対する追加的な制御を導入する。 ◎ CSS Levels 1 and 2 only defined very basic line decorations (underlines, overlines, and strike-throughs) appropriate to Western typographical traditions. Level 3 of this module added the ability to change the color, style, position, and continuity of these decorations, and also introduced emphasis marks (traditionally used in East Asian typography), and shadows (which were proposed then deferred from Level 2). Level 4 introduces additional controls over these decorations.
1.1. ~module間の相互作用
この~moduleは、 `CSS-TEXT-DECOR-3$r にて定義された,~textを装飾するための特能を置換して拡張する。 ◎ This module replaces and extends the text-decorating features defined in [CSS-TEXT-DECOR-3].
この~moduleに与える,すべての~propは、[ `first-line$pe / `first-letter$pe ]`疑似要素$にも適用できる。 ◎ All of the properties in this module can be applied to the ::first-line and ::first-letter pseudo-elements.
1.2. 値~定義
【 この節の内容は、 `~CSS日本語訳 共通~page@~CSScommon#values$に移譲。 】
1.3. 各種用語
この仕様にて利用される用語[ `~typographic文字~単位$( `文字@ ), `~typographic字l~単位$( `字l@ ), `内容~言語$ ]は、 `CSS-TEXT-3$r にて定義される。 この仕様にて利用される 他の各種用語と概念は[ `CSS2$r, `CSS-WRITING-MODES-4$r【, `CSS-INLINE-3$r】 ]にて定義される。 ◎ The terms typographic character unit (character), typographic letter unit (letter), and content language as used in this specification are defined in [CSS-TEXT-3]. Other terminology and concepts used in this specification are defined in [CSS2] and [CSS-WRITING-MODES-4].
【 この訳では、 次の用語も追加的に定義する: 】
`縦書き~mode@ とは、[ `~typographic~mode$が,縦書き用字系における縦方向~flowである ]ことを意味する略記である。 `横書き~mode@ とは、 `縦書き~mode$でないことを意味する (`縦組み$の中で縦方向に回転された横方向~flowも含む)。
2. 装飾線: 下線, 上線, 打消線【!strike-through】
この節に述べる各種~propは、 要素の内容に追加される装飾線を述べる。 `行内~box$に装飾が[ 指定された/伝播した ]とき、 当の~boxは,当の装飾~用の `装飾ng~box@ になる — 当の装飾は、 当の~boxを成す すべての`~box断片$に適用される。 装飾は、 次に従って伝播する: ◎ The following properties describe line decorations that are added to the content of an element. When specified on or propagated to an inline box, that box becomes a decorating box for that decoration, applying the decoration to all its box fragments.\
- 当の行内を更に分割する[ `~flow内$にある`塊~levelの~box$たち ]へ伝播する ( `CSS2$r `§ 匿名な~block~box@~CSS2J#anonymous-block-level$ を見よ)。 ◎ The decoration is then further propagated to any in-flow block-level boxes that split the inline (see CSS2.1 section 9.2.1.1).\
- `塊~容器$のうち`行内~整形~文脈$を確立するものに[ 指定された/伝播した ]ときは、[ 当の塊~容器の`~flow内$にある,`行内~level$の子たち ]すべてを包装する`匿名$な`行内~box$へ伝播する。 ◎ When specified on or propagated to a block container that establishes an inline formatting context, the decorations are propagated to an anonymous inline box that wraps all the in-flow inline-level children of the block container.\
- `~ruby容器$に[ 指定された/伝播した ]ときは、 その`~ruby基底$のみへ伝播する。 ◎ When specified on or propagated to a ruby container, the decorations are propagated only to the ruby base.\
- 他のすべての型の~box用には、 `~flow内$にあるすべての子へ伝播する。 ◎ For all other box types, the decorations are propagated to all in-flow children.
注記: ~text装飾は、[ `~flow外$にある子孫/ `不可分な行内~level$の子孫 — `行内~塊$や`行内~table$など — の内容 ]には伝播しない。 また、 `行内~box$の子である`行内$【`行内~levelの~box$?】にも伝播しない — そのような各~boxにも`装飾は適用される^emが。 ◎ Note that text decorations are not propagated to any out-of-flow descendants, nor to the contents of atomic inline-level descendants such as inline blocks and inline tables. They are also not propagated to inline children of inline boxes, although the decoration is applied to such boxes.
[ 下線, 上線, 打消線 ]は、 `置換され$ない`行内~box$に限り, すべての~text(空白, 字lアキ, 単語アキも含む)をまたぐように描かれる — ただし、[ 先頭/末尾 ]に生じるアキ(空白, 字lアキ, 単語アキ)を除く。 `不可分な行内$ — 画像や`行内~塊$など — は、 装飾されない。 `装飾ng~box$の[ ~margin, ~border, ~padding ]は,常に飛ばされるが、 子孫~行内~boxの[ それら ]は,飛ばされない。 ◎ Underlines, overlines, and line-throughs are drawn only for non-replaced inline boxes, and are drawn across all text (including white space, letter spacing, and word spacing) except spacing (white space, letter spacing, and word spacing) at the beginning and end of a line. Atomic inlines, such as images and inline blocks, are not decorated. Margins, borders, and padding of the decorating box are always skipped, however the margins, border, and padding of descendant inline boxes are not.
注記: `CSS2$r では[ ~margin, ~border, ~padding ]を常に飛ばすことが要求されている。 ~level 3 以降の既定では、 `装飾ng~box$の[ ~margin, ~border, ~padding ]に限り飛ばされる。 将来の `CSS2$r は、 この新たな既定に合致するよう更新されるかもしれない。 ◎ Note that CSS 2.1 required skipping margins, borders, and padding always. In Level 3 and beyond, by default only the margins, borders, and padding of the decorating box are skipped. In the future CSS2.1 may be updated to match this new default.
子孫に対する`相対~位置決め$は、 それに適用されている~text装飾~すべてを,子孫の~textと一緒に移動させる — 相対~位置決めは、 その行l上の装飾の初期~位置の計算には影響しない。 同様に、[ `visibility$p ~prop, `text-shadow$p, ~filter, その他の~graphicな変形n ]も,当の~boxに適用されている~text装飾~すべてに — 先祖~boxから伝播した装飾も含めて — 影響し,装飾の初期~位置や太さの計算には影響しない。 (装飾線が[ `不可分な行内$や`置換され$ない`行内~box$ ]の[ ~margin/~border/~padding ]越しに描かれる事例でも、 装飾線は,`装飾ng~box$ではなく影響される行内~boxに結付けられる。) ◎ Relatively positioning a descendant moves all text decorations applied to it along with the descendant’s text; it does not affect calculation of the decoration’s initial position on that line. The visibility property, text-shadow, filters, and other graphical transformations likewise also affect all text decorations applied to that box—including decorations propagated from an ancestor box—and do not affect the calculation of their initial positions or thicknesses. (In the case of line decorations drawn over an atomic inline or across the margins/borders/padding of a non-replaced inline box, they are analogously associated with the affected atomic inline / non-replaced inline box rather than with the decorating box.)
次の~stylesheetと文書片が与えられたとき: ◎ In the following style sheet and document fragment:
blockquote { text-decoration: underline; color: blue; }
em { display: block; }
cite { color: red【!fuchsia】; }
<blockquote> <p> <span> Help, help! <em> I am under a hat! </em> <cite> —GwieF </cite> </span> </p> </blockquote>
`blockquote^e 要素に下線を引くと, `span^e 要素を囲む匿名な行内~boxへ伝播して、 その最初の~text "Help, help!" から下線が引かれる。 下線の色は `blockquote^e 要素から取り出される色 `blue^v と同じになる。 `em^e 塊~内の~text "I am under a hat!" にも,下線が引かれる — その~textを囲う塊は`~flow内$にあり,下線が伝播されるので。 ~~最後の行l `cite^e の~text色は `red^v にされているが、 それでも,下線の色は匿名な`行内~box$【!行内~要素】と同じ `blue^v になる。 ◎ ...the underlining for the blockquote element is propagated to an anonymous inline box that surrounds the span element, causing the text "Help, help!" to be blue, with the blue underlining from the anonymous inline underneath it, the color being taken from the blockquote element. The <em>text</em> in the em block is also underlined, as it is in an in-flow block to which the underline is propagated. The final line of text is fuchsia, but the underline underneath it is still the blue underline from the anonymous inline element.
上の下線~例の見本~描画 ◎ Sample rendering of the above underline example
次の~stylesheet, 文書片においては: ◎ In the following style sheet and document fragment:
div {
color: black;
font-size: 48px;
text-decoration: underline;
text-shadow: blue 0px 50px 0px;
}
span {
font-size: 20px;
vertical-align: top;
text-shadow: green 0px 100px 0px;
}
<div>Help, help! <span>I am under a hat!</span></div>
`div^e は、 自身の下線( `black^v )用の`装飾ng~box$になる。 この下線は、 `div^e, `span^e 両方を通して途切れないよう描画される。 しかしながら,装飾線と違って、 `text-shadow^p は,~propとして継承される。 したがって、 `span^e 上の~text影( `green^v )は, `div^e 上の~text影( `blue^v )を上書きする。 その結果,これらの影が塗られるとき、 `div^e の下線の影は, `span^e 要素の境目で切り替わる。 ◎ ...the <div> is the decorating box for its underline (in black), which is rendered uninterrupted through both the <div> and the <span>. Unlike line decorations, however, `text-shadow` is inherited as a property; therefore the green text shadow on the <span> overrides the blue text shadow on the <div>. As a result, when the shadows are painted, the shadow of the <div>’s underline is disjoint across the two elements.
上の下線~例の見本~描画 ◎ Sample rendering of the above underline example
注記:
装飾線は、
継承ではなく~box~treeを通して伝播する。
したがって
`display$p: `contents^v
を伴う要素に指定されても,子孫に対する効果はない。
◎
Note: Line decorations are propagated through the box tree, not through inheritance, and thus have no effect on descendants when specified on an element with display: contents.
2.1. ~text装飾~線: `text-decoration-line^p ~prop
この~propは, `text-decoration$p 略式の`下位prop$であり、 要素に追加する装飾線を指定する, または追加しないことを指定する。 `none^v 以外の値は、 指示された~text装飾が要素から出生するようにして, § `装飾線$にて述べたとおりに,それを[ 適用する, 伝播させる ]。 ◎ This property, which is a sub-property of the text-decoration shorthand, specifies what line decorations, if any, are added by the element. Values other than none cause the element to originate the indicated text decorations, and to apply and propagate it as described above.
注記: 行lの[ 色/~style/太さ ]を`~cascade$において低優先度な宣言で設定することが欲されない限り、 この`下位prop$よりも `text-decoration$p `略式~prop$を利用する方が安全である。 ◎ Note: Unless it is desired for the color, style, and thickness of the lines to be set by declarations lower in the cascade, it is safer to use the text-decoration shorthand instead of this longhand.
各種~値の意味は: ◎ Values have the following meanings:
- `none@v
- ~text装飾を生産することも, 妨げることもない。 ◎ Neither produces nor inhibits text decoration.
- `underline@v
- ~textの各~行lには、 下線が引かれる。 ◎ Each line of text is underlined.
- `overline@v
- ~textの各~行lには、 上線(すなわち,下線と反対~側)が引かれる。 ◎ Each line of text has a line over it (i.e. on the opposite side from an underline).
- `line-through@v
- ~textの各~行lには、 真中を通る線が引かれる。 ◎ Each line of text has a line through the middle.
- `blink@v
- ~textは点滅する(可視と不可視の間で交替する)。 適合~UAは、 単純に~textを点滅させなくしてもヨイ。 ~textを点滅させないことは、 `checkpoint 3.3 of WAI-UAAG@~TR/UAAG/guidelines.html#tech-on-off-blinking-text$en を満たす技法の一つであることに注意。 この値は、 `CSS3-ANIMATIONS$r への支持を受けて非推奨にされた。 ◎ The text blinks (alternates between visible and invisible). Conforming user agents may simply not blink the text. Note that not blinking the text is one technique to satisfy checkpoint 3.3 of WAI-UAAG. This value is deprecated in favor of Animations [CSS3-ANIMATIONS].
- `spelling-error@v
- この値は、 ~UAが誤った綴りを強調するために利用する種別の~text装飾を指示する。 その外観は~UAにより定義され,~platformに依存し得る。 これは、 赤い波状な下線で描画されることが多い。 ◎ This value indicates the type of text decoration used by the user agent to highlight spelling mistakes. Its appearance is UA-defined, and may be platform-dependent. It is often rendered as a red wavy underline.
- `grammar-error@v
- この値は、 ~UAが文法の誤りを強調するために利用する種別の~text装飾を指示する。 その外観は、 ~UAにより定義され,~platformに依存し得る。 これは、 緑色な波状な下線で描画されることが多い。 ◎ This value indicates the type of text decoration used by the user agent to highlight grammar mistakes. Its appearance is UA defined, and may be platform-dependent. It is often rendered as a green wavy underline.
注記: `縦組み$においては、 `text-underline-position$p により,[ 下線, 上線 ]が引かれる側を切替えることもできる。 これにより、 下線の位置を,言語に特有な選好に自動的に基づかせることが可能になる。 ◎ Note: In vertical writing modes, text-underline-position can cause the underline and overline to switch sides. This allows the position of underlines to key off of language-specific preferences automatically.
[ `spelling-error$v / `grammar-error$v ]が適用されるときは、 ~UAは[ `text-decoration$p の他の`下位prop$ ]および[ 概して装飾線の外観にも影響する他の~prop ( `text-underline-position$p, `color$p, `stroke$p, `fill$p など) ]を無視rするモノトスル。 しかしながら,~UAは、 `accent-color$p ~propを織り込んでもヨイ。 ◎ When spelling-error or grammar-error apply, the user agent must disregard the other sub-properties of text-decoration, as well any other properties typically affecting the appearance of line decorations (such as text-underline-position, color, stroke, or fill) when rendering these decorations. However, the user agent may take into account the accent-color property.
2.2. ~text装飾~style: `text-decoration-style^p ~prop
この~propは, `text-decoration$p 略式の`下位prop$であり、 要素~上の `text-decoration-line$p にて指定された[ 下線/上線/打消線 ]を描くときの~styleを設定する。 この~styleは、 子孫~boxが異なる~styleを指定していても, この要素から出生しているすべての装飾に影響する。 ◎ This property, which is a sub-property of the text-decoration shorthand, sets the line-drawing style of underlines, overlines, and line-throughs specified on the element with text-decoration-line, and affects all decorations originating from this element even if descendant boxes specify a different style.
`wavy@v は波線を指示する — それ以外の各種 値の意味は、 `border-*-style$p ~prop `CSS-BACKGROUNDS-3$r 用の同じ名前の値と同じである。 ◎ Values have the same meaning as for the border-style properties [CSS-BACKGROUNDS-3]. wavy indicates a wavy line.
2.3. ~text装飾~色: `text-decoration-color^p ~prop
この~propは, `text-decoration$p 略式の`下位prop$であり、 要素~上の `text-decoration-line$p にて指定された[ 下線/上線/打消線 ]の色を設定する。 この色は、 子孫~boxが異なる色を指定していても,この要素から出生しているすべての装飾にも影響する。 ◎ This property, which is a sub-property of the text-decoration shorthand, sets the color of underlines, overlines, and line-throughs specified on the element with text-decoration-line, and affects all decorations originating from this element even if descendant boxes specify a different color.
2.4.~text装飾~線の太さ: `text-decoration-thickness^p ~prop
この~propは, `text-decoration$p 略式の`下位prop$であり、 要素~上の `text-decoration-line$p にて指定された[ 下線/上線/打消線 ]の太さを設定する。 この太さは、 子孫~boxが異なる太さを指定していても,この要素から出生している すべての装飾に影響する。 ◎ This property, which is a sub-property of the text-decoration shorthand, sets the stroke thickness of underlines, overlines, and line-throughs specified on the element with text-decoration-line, and affects all decorations originating from this element even if descendant boxes specify a different thickness.
各種~値の意味は: ◎ Values have the following meanings:
- `auto@v
- ~UAは、 ~text装飾~線~用に適切な太さを選ぶ — 下を見よ。 ◎ The UA chooses an appropriate thickness for text decoration lines; see below.
- `from-font@v
- `可用な最初の~font$が[ 選好される下線~幅を指示する計量 ]を有するならば、 その幅を利用する — 他の場合、 `auto$v として挙動する。 ◎ If the first available font has metrics indicating a preferred underline width, use that width, otherwise behaves as auto.
- `length-percentage$t
- 長さ値は、 ~text装飾~線の太さを固定d長さとして指定する。 ◎ A length value specifies the thickness of text decoration lines as a fixed length.
- 注記: 長さは,固定d値として継承されるので、 ~fontと伴に拡縮されることはない。 ◎ Note: A length will inherit as a fixed value, and will not scale with the font.
- 百分率~値は、 ~text装飾~線の太さを `1em^v の百分率として指定する。 ◎ A percentage value specifies the thickness of text decoration lines as a percentage of 1em.
- 注記: 百分率は,相対~値として継承されるので、 継承-時には,~fontの変化に伴い拡縮される。 ◎ Note: A percentage will inherit as a relative value, and will therefore scale with changes in the font as it inherits.
- ~UAは、 `実際の値$を[ 最も近い整数~機器~画素に丸めた上で, 1 機器~画素~以上になることを確保する ]ベキである。 ◎ The UA should round the actual value to the nearest integer device pixel, and ensure it is at least one device pixel.
2.4.1. 自動的な太さによる~text装飾~線
~font形式(~OpenTypeなど)には、 装飾線の適切な太さについての情報を提供できるものもある。 ~UAは,適切になるなら、 `auto$v 用の線~太さを選ぶときに, そのような ~fontに基づく情報を利用するベキである。 ◎ Some font formats (such as OpenType) can offer information about the appropriate thickness of a line decoration. The UA should use such font-based information when choosing auto line thicknesses wherever appropriate.
2.5. 装飾線の位置, 太さの決定-法
この節は、 ~level 3 の早期~草案からの複製であり, 依然として考査の下にある — [ `text-underline-offset$p, `text-decoration-thickness$p ]との統合が必要である。 ◎ This section is copied over from early drafts of Text Decoration Level 3. It is still under review, and needs integration with text-underline-offset and text-decoration-thickness.
装飾線は,~font~sizeや縦方向の整列がまちまちな要素にも~spanし得るので、 装飾線~用の最良な位置は, `装飾ng~box$により規定される理想的な位置になるとは限らない。 代わりにそれは、 行lごとに,その行l上で `考慮される~text@ — 当の行l上にある,`装飾ng~box$により装飾されるすべての~text — に対し計算される。 しかしながら,`装飾ng~box$の子孫のうち次に挙げるものは、 `考慮される~text$の集合からは除外される: ◎ Since line decorations can span elements with varying font sizes and vertical alignments, the best position for a line decoration is not necessarily the ideal position dictated by the decorating box. Instead, it’s calculated, per line, from all text decorated by the decorating box on that line, the considered text. However,\
- その `text-decoration-skip$p に因り飛ばされるもの ◎ descendants of the decorating box that are skipped due to text-decoration-skip,\
- `行内$【`行内~box$?】であって, その `text-decoration-skip$p は【新たに導入され得る値】 `ink^v をとるもの ◎ descendant inlines with text-decoration-skip: ink,\
- 当の`装飾ng~box$の`行内~整形~文脈$には関与しないもの ◎ and any descendants that do not participate in the decorating box’s inline formatting context\ ↑ are excluded from the set of considered text.
装飾線の位置は、 行lごとに次に従って計算される( [ `上面$/`下面$ ]に位置された[ 下線/上線 ]は[ `上面$/`下面$ ]線として扱う下で): ◎ The line decoration positions are then calculated per line as follows (treating over-positioned underlines as over lines and under-positioned overlines as under lines):
- `上面$線 ◎ over lines
- 装飾線を[ `考慮される~text$【を成す各~glyph】の最も高い`上面$にある~EM~box辺 ]に~~相対的に整列する。 ◎ Align the line decoration with respect to the highest over EM-box edge of the considered text.
- ~alphabetic下線 ◎ alphabetic underlines
- ~alphabetic下線の位置は、 `考慮される~text$を成す各~連なりの( `alphabetic$bL 基底線からの)理想的な~offsetをとって, それらを平均してから, 実際に線を位置するときには【各~連なりの】 `alphabetic$bL 基底線のうち最も低いものを利用することにより計算される。 (`支配的な基底線$が `alphabetic$bL でない場合、 【各~連なりの】 `alphabetic$bL 基底線は, `baseline$v 【親の`支配的な基底線$】に整列された~boxごとに相違し得る)。 [ 上付文字/下付文字 ]がこの位置を狂わすことを防止するため、[ 行内のうち `vertical-align$p の算出d値は初期~値でないもの ]は,その親の理想的な下線~位置を有するものとして扱われる。 ◎ The alphabetic underline position is calculated by taking the ideal offset (from the alphabetic baseline) of each run of considered text, averaging those, and then using the lowest alphabetic baseline to actually position the line. (Alphabetic baselines can differ between baseline-aligned boxes if the dominant baseline is non-alphabetic.) To prevent superscripts and subscripts from throwing this position off-kilter, an inline with a non-initial computed vertical-align is treated as having the ideal underline position of its parent.
- ~alphabeticでない`下面$線 ◎ non-alphabetic under lines
- 装飾線を[ `考慮される~text$【を成す各~glyph】の最も低い`下面$ ~EM~box辺 ]に~~相対的に位置する。 ◎ Position the line decoration with respect to the lowest under EM-box edge of the considered text.
- 打消線 ( `line-through^en ) 【 `strike-through^en とも称されるが、この訳では同じ語に統一する。】 ◎ line-throughs
- 打消線は、 本質的には, ~alphabeticな下線~用のそれと同じ類の平均-法を利用するが、 `font-size$p の算出d値が異なる子孫たちをまたぐように描くときには, 位置を算出し直す (これは、 実質的に,[ ~font~sizeが変化しても打消線が~textを “横切り” 続ける ]ことを確保する)。 [ `考慮される~text$を成す各~連なりのうち,同じ `font-size$p を伴うもの ]に対し,その~font計量から平均された理想的な位置を算出する。 [ 上付文字/下付文字 ]がこの位置を狂わすのを防ぐため、[ 行内~levelの~boxのうち `vertical-align$p の算出d値が初期~値をとらないもの ]は,その親の理想的な下線~位置を有するものと扱われる。 当の線を成す部位のうち装飾された各~断片にまたがるものは、 その位置【下線~位置?算出し直された位置?】に位置する。 ◎ Line-throughs essentially use the same sort of averaging as for alphabetic underlines, but recompute the position when drawing across a descendant with a different computed font-size. (This ensures that the text remains effectively “crossed out” despite any font size changes.) For each run of considered text with the same font-size, compute an ideal position averaged from its font metrics. To prevent superscripts and subscripts from throwing this position off-kilter, an inline with a non-initial computed vertical-align is treated as having the ideal underline position of its parent. Position the portion of the line across each decorated fragment at that position.
- 単純にするため、 各~要素~越しの打消線は,当の要素に[ 選好される/平均された ]位置に描くベキである。 これは,望ましくない段差を生産し得るが、[ すべての~instanceにおいて正しくなるよう,それを避ける仕方 ]は見当たらず,すべての試みは複階的になり過ぎる。 異なる~font-sizeを伴うが`考慮される~text$が無い要素~越しの打消線は、 どの位置を採用するベキか? ◎ For simplicity, line-throughs should draw over each element at that element’s preferred/averaged position. This can produce some undesirable jumpiness, but there doesn’t appear to be any way to avoid that which is correct in all instances, and all attempts are worryingly complex. What position should line-throughs adopt over elements that have a different font-size, but no considered text?
~CSSは、 装飾線の太さを定義しない。 ~UAは、 ~text装飾~線の太さを決定するにあたっては,[ 各~子孫の~fontの[ ~size, 書体f, ~weight ]も考慮する下で,適切に平均された太さ ]を供してもヨイ。 ◎ CSS does not define the thickness of line decorations. In determining the thickness of text decoration lines, user agents may consider the font sizes, faces, and weights of descendants to provide an appropriately averaged thickness.
次の図に,下線~用の平均-法を示す: ◎ The following figure shows the averaging for underline:
上付文字 "st" を伴う~text "1st a" に下線が引かれたときの 3 種の描画: 1 個目では, "1st" も "a" も小さい~fontで描画され、 2 個目では,[ "1st" は小さい~font, "a" は大きい~font ]で描画され、 3 個目では, "1st" も "a" も大きい~fontで描画されている。 ◎ In the first rendering of the underlined text '1st a' with 'st' as a superscript, both the '1st' and the 'a' are rendered in a small font. In the second rendering, the 'a' is rendered in a larger font. In the third, both '1st' and 'a' are large.
下線が引かれた~textを成す 3 個の断片において,下線は連続するように描かれる — 大きい~textの小さい~textに対する比が増えるほど,低く, 太くなるよう。 ◎ In the three fragments of underlined text, the underline is drawn consecutively lower and thicker as the ratio of large text to small text increases.
上と同じ例における打消線は、 2 個目の断片においては,線は 2 つの~font~sizeを平均することなく 2 本の線分に分割される: ◎ Using the same example, a line-through would in the second fragment, instead of averaging the two font sizes, split the line-through into two segments:
しかしながら,どちらの事例でも、 上付文字には,[ その縦方向~整列のズレに因る,線の位置に対する効果 ]は無い。 ◎ In both cases, however, the superscript, due to the vertical-alignment shift, has no effect on the position of the line.
2.6. ~text装飾: `text-decoration^p 略式~prop
この~propは、[ `text-decoration-line$p, `text-decoration-color$p, `text-decoration-thickness$p, `text-decoration-style$p ]を 1 個の宣言で設定するための略式~propである。 省略された値は、 各自の初期~値に設定される。 ◎ This property is a shorthand for setting text-decoration-line, text-decoration-thickness, text-decoration-style, and text-decoration-color in one declaration. Omitted values are set to their initial values.
次の例による未訪問な~linkには、 CSS1/CSS2 ~UAにおいては,実線による `blue^v な下線が引かれ、 CSS3 ~UAにおいては,点線(小丸の並び)による `navy^v な下線が引かれる。 ◎ The following example underlines unvisited links with a solid blue underline in CSS1 and CSS2 UAs and a navy dotted underline in CSS3 UAs.
:link {
color: blue;
text-decoration: underline;
text-decoration: navy dotted underline; /*
CSS1/CSS2 ~UAにおいては,`無視される@~CSSSYN#css-ignored$
◎
Ignored in CSS1/CSS2 UAs
*/
}
注記: `text-underline-position$p ~propがこの~propから省かれているわけは、 それが内容に基づく[ 言語/書記体系 ]に依存する設定であり, (継承されない) `text-decoration$p 略式~propによる~style上の設定とは独立に~cascadeして継承できるようにするためである。 ◎ Note: The shorthand purposefully omits the text-underline-position property, which is a language/writing-system–dependent setting that keys off the content, so that it can cascade and inherit independently from the (uninherited) stylistic settings of the text-decoration shorthand.
2.7. ~text下線の位置: `text-underline-position^p ~prop
この~propは、 `text-decoration$p 略式の`下位prop$`ではない^em。 それは、 ~textに~~相対的な下線の位置を設定することに加え, `text-underline-offset$p による更なる調整~用に下線の`~zero位置$も定義する。 この下線~位置は、 子孫~boxが異なる位置を指定していても,この要素から出生しているすべての装飾に影響するが、 先祖~要素が指定した下線には影響しない。 ◎ This property, which is not a sub-property of the text-decoration shorthand, sets the position of an underline with respect to the text, and defines its zero position for further adjustment by text-underline-offset. It affects all decorations originating from this element, even if descendant boxes specify a different position. It does not affect underlines specified by ancestor elements.
次の例は、 現代の[ 中国語, 日本語, 韓国語 ]の~textを[ 横書き, 縦書き ]両~textにおいて,適切な下線~位置で~styleする。 ◎ The following example styles modern Chinese, Japanese, and Korean texts with the appropriate underline positions in both horizontal and vertical text:
:root:lang(ja), [lang|=ja], :root:lang(ko), [lang|=ko] {
text-underline-position: under right;
}
:root:lang(zh), [lang|=zh] {
text-underline-position: under left;
}
[ `left$v / `right$v ]のみが指定された場合、 `auto$v も含意される。 各種~値の意味は: ◎ If left or right is specified alone, auto is also implied. Values have the following meanings:
- `auto@v
- ~UAは、 下線の位置を決定するにあたり,どのような~algoを利用してもヨイが、 `alphabetic$bL 基底線の所か それより下に引くモノトスル。 ◎ The user agent may use any algorithm to determine the underline’s position; however it must be placed at or under the alphabetic baseline.
- 注記: ~UAには、 既定の下線~位置は `alphabetic$bL 基底線になるべく近くすることが示唆される — ~alphabeticな下線が高過ぎて,下付文字~化された(あるいは低くされた)~textに交叉したり, 漢字や~Tibetanなどの~Asian用字系の~glyph越しに描くことになる場合、 `under$v にて述べたとおり,下線を[ 低くズラすか, ~em~box辺に整列する ]方が適切になろう。 ◎ Note: It is suggested that the default underline position be close to the alphabetic baseline, unless that would either cross subscripted (or otherwise lowered) text or draw over glyphs from Asian scripts such as Han or Tibetan for which an alphabetic underline is too high: in such cases, shifting the underline lower or aligning to the em box edge as described for under may be more appropriate.
-
典型的な~Latin~fontにおける下線は、 `alphabetic$bL 基底線の少しだけ下に位置される。 下線は、 大多数の~Latin字lの下端との合間には隙間を残しつつ, 字l "p" の画線などの~descenderとは交叉する。 ◎ In a typical Latin font, the underline is positioned slightly below the alphabetic baseline, leaving a gap between the line and the bottom of most Latin letters, but crossing through descenders such as the stem of a 'p'.
典型的な “~alphabetic” 下線は、 `alphabetic$bL 基底線の直下に位置される ◎ A typical “alphabetic” underline is positioned just below the alphabetic baseline - `from-font@v
- `可用な最初の~font$が[ 選好される下線~offsetを指示する計量 ]を有するならば その~offsetを利用する — 他の場合、 `auto$v として挙動する。 ◎ If the first available font has metrics indicating a preferred underline offset, use that offset, otherwise behaves as auto.
- `under@v
- 下線は、 要素の~text内容の`下面$に位置される。 この事例では、 下線は通例的には~descenderと交叉しない (これは “`accounting^en” 下線と呼ばれることもある)。 この値は、 `縦書き~mode$において特定0の側が選好されるならば[ `left$v / `right$v ]と組合せることもできる。 ◎ The underline is positioned under the element’s text content. In this case the underline usually does not cross the descenders. (This is sometimes called “accounting” underline.) This value can be combined with left or right if a particular side is preferred in vertical typographic modes.
-
典型的な~Latin~fontにおける下線は、 "g" の下端とは交叉しないよう, ~textより十分~下に位置される。 ◎ In a typical Latin font, the underline is far enough below the text that it does not cross the bottom of a 'g'.
`text-underline-position$p: `under^v -
`text-underline-position$p は継承され, また `text-decoration$p 略式~propが それを設定し直すことはないので、 次の例は[ 文書が `under$v による下線を利用する ]ように切替える。 これは、 長く, 複雑な~descenderを伴う書記体系~用には,より適切になることもある。 また、 下付文字を多用する[ 数学/化学 ]~~分野の~text用にも,有用になることが多い。 ◎ Because text-underline-position inherits, and is not reset by the text-decoration shorthand, the following example switches the document to use under underlining, which can be more appropriate for writing systems with long, complicated descenders. It is also often useful for mathematical or chemical texts that use many subscripts.
:root { text-underline-position: under; } - 注記: 値 `under^v は、 下線が~glyphと競合しないことを保証するものではない — ~fontには、[ ~descender/発音区別符 ]が,~fontの~descent計量の下へ拡張するものもあるので。 ◎ Note: The under value does not guarantee that the underline will not conflict with glyphs, as some fonts have descenders or diacritics that extend below the font’s descent metrics.
- `left@v
- `縦書き~mode$においては、 下線は,常に~textの左端~辺に整列されることを除いて, `under$v に対するときと同様に整列され、 上線は,その反対~側に整列される。 ◎ In vertical typographic modes, the underline is aligned as for under, except it is always aligned to the left edge of the text. If this causes the underline to be drawn on the "over" side of the text, then an overline also switches sides and is drawn on the "under" side.
- `right@v
- “左端” を “右端” に読み替える下で, `left$v と同様になる。 ◎ In vertical typographic modes, the underline is aligned as for under, except it is always aligned to the right edge of the text. If this causes the underline to be drawn on the "over" side of the text, then an overline also switches sides and is drawn on the "under" side.
日本語と~Latinが混在する縦書き~textでは、
`text-underline-position^p: `left^v
の下では,~textの左~側に下線を引く。
◎
In mixed Japanese-Latin vertical text, 'text-underline-position: left' places the underline on the left side of the text.
日本語と~Latinが混在する縦書き~textでは、
`text-underline-position^p: `right^v
の下では,~textの右~側に下線を引く。
◎
In mixed Japanese-Latin vertical text, 'text-underline-position: right' places the underline on the right side of the text.
2.8. ~text下線~offset: `text-underline-offset^p ~prop
この~propは、 `text-decoration$p 略式の`下位prop$`ではない^em。 これは、 下線の`~zero位置$からの~offsetを設定する。 [ 正な/負な ]~offsetは、 ~textからの[ 外方/内方 ]への距離を表現する。 この~offsetは、 子孫~boxが異なる位置を指定していても,この要素から出生しているすべての装飾に影響するが、 先祖~要素により指定された下線には影響しない。 ◎ This property, which is not a sub-property of the text-decoration shorthand, sets the offset of underlines from their zero position. Positive offsets represent distances outward from the text; negative offsets inward. It affects all decorations originating from this element, even if descendant boxes specify a different position. It does not affect underlines specified by ancestor elements.
各種~値の意味は: ◎ Values have the following meanings:
- `auto@v
- ~UAは下線~用に適切な~offsetを選ぶ。 ◎ The UA chooses an appropriate offset for underlines.
- しかしながら,この~offsetは、 次に該当する場合は 0 にするモノトスル ⇒ [ `text-underline-position$p の算出d値は `from-font$v1 ]~AND[ ~UAは,利用する適切な計量を~fontから抽出-可能である ] ◎ However, this offset must be zero if the computed value of text-underline-position is from-font and the UA was able to extract an appropriate metric to use from the font.
- `length-percentage$t
- 長さ値は、 下線の~offsetを固定d長さとして指定する。 ◎ A length value specifies the offset of underlines as a fixed length.
- 注記: 長さは,固定d値として継承されるので、 ~fontと伴に拡縮されることはない。 ◎ Note: A length will inherit as a fixed value, and will not scale with the font.
- 百分率~値は、 下線の~offsetを `1em^v の百分率として指定する。 ◎ A percentage value specifies the offset of underlines as a percentage of 1em.
- 注記: 百分率は,相対~値として継承されるので、 継承-時には,~fontの変化に伴い拡縮される。 ◎ Note: A percentage will inherit as a relative value, and will therefore scale with changes in the font as it inherits.
`text-decoration-line$p ~propの値が[ `spelling-error$v1 / `grammar-error$v1 ]のときは、 ~UAは, `text-underline-position$p の値を無視するモノトスル。 ◎ When the value of the text-decoration-line property is either spelling-error or grammar-error, the UA must ignore the value of text-underline-position.
2.8.1. 下線~offsetの原点(~zero位置)
下線の `~zero位置@ は、 以下に詳細されるとおり, `text-underline-position$p の値に依存する。 ◎ The zero position of the underline depends on the value of text-underline-position as detailed below.
| `text-underline-position$p | `~zero位置$ | 正な方向 |
|---|---|---|
| `auto$v1 | `alphabetic$bL 基底線 | `下面$ |
| `from-font$v1 | ~font計量により指定される位置 — ~fall-backするときは `alphabetic$bL 基底線 | `下面$ |
| `under$v1 | `text-under$bL 辺【~EM~boxの下面~辺】 | `下面$ |
| `left$v1 | `text-under$bL 辺(縦書きの下では左端) | `下面$ |
| `right$v1 | `text-over$bL 辺【~EM~boxの上面~辺】(縦書きの下では右端) | `上面$ |
下線は、 指定された位置の外側に(その太さを正な方向に限り拡張して)整列される。 ◎ The underline is aligned to the outside of the specified position (extending its thickness in the positive direction only).
子孫~内容を収容するために為される自動的な調整は、 保守される — `text-underline-offset$p は、 それらに対する追加になる。 ◎ Any automatic adjustments made to accommodate descendant content are maintained; the text-underline-offset is in addition to those.
2.8.2. 自動的な位置決め用の~font計量の利用-法
~font形式には、 装飾線の適切な位置についての情報を提供できるものもある(~OpenTypeなど)。 ~UAは、 `auto$v 用に~offsetを選ぶ際には, そのような~fontに基づく情報を ⇒# 適切になるときは,利用するべきである。 `text-underline-position$p に `from-font$v1 が指定されたときは,利用するモノトスル。 ◎ Some font formats (such as OpenType) can offer information about the appropriate position of a line decoration. The UA should use such font-based information in its choice of auto offset wherever appropriate, and must use such information when from-font is specified for text-underline-position.
注記: ~OpenType~fontの計量は、 概して, `alphabetic$v 下線の位置を与える。 事例によっては(とりわけ~CJK~fontにおいては),それは `under left^v 下線の位置を与える (この事例では、 ~fontの下線~計量は,概して~em~boxの下端~辺に触れる)。 ~UAは、 要求-はされないが,不正な~font計量を正してもヨイ。 ◎ Note: Typically, OpenType font metrics give the position of an alphabetic underline; in some cases (especially in CJK fonts), it gives the position of a under left underline. (In this case, the font’s underline metrics typically touch the bottom edge of the em box). The UA may but is not required to correct for incorrect font metrics.
2.9. ~text装飾~線の一様性
装飾線の正確な[ 位置, 太さ ]は、 上で定義したとおり,[ `text-underline-position$p, `text-underline-offset$p, `text-decoration-thickness$p ]の値に依存する。 他の場合【それらの値が初期~値 `auto^v をとる場合】、 ~UAにより定義される。 しかしながら,~UAは、 同じ`装飾ng~box$から導出される装飾~用には,各[ 下線/上線 ]用の[ 位置, 太さ ]を一定にするモノトスル。 ◎ The exact position and thickness of line decorations depends on the values of text-underline-position, text-underline-offset, and text-decoration-thickness as defined above, and is otherwise UA-defined. However, for underlines and overlines the UA must use a single thickness and position on each line for the decorations deriving from a single decorating box.
~font~sizeと縦~位置がまちまちな下で描かれる単独の下線は、 1 本の線を成していなければならない。 ◎ A single underline drawn under varying font sizes and vertical positions must be a single line.
vs.装飾される各~textに適切な位置と太さを伴う,複数本の線分を描くのは、 不正になる。 ◎ Drawing multiple line segments, each with the position and thickness appropriate to the decorated text, is incorrect.
注記: 装飾線は,~font~sizeや縦方向の整列がまちまちな要素にも~spanし得るので、 装飾線~用の最良な位置は,`装飾ng~box$により規定される理想的な位置になるとは限らない。 例えば,小さい~fontに合わせて位置される上線は、 要素が[ ~font-sizeが有意に大きい~text ]も包含する場合には,実質的に打消線になる。 下線の場合でも,~textが `alphabetic$bL 基底線に整列されていない場合には (例えば,縦書き植字~styleの既定では、 ~textは,その `central$bL 基底線により整列される `CSS-WRITING-MODES-4$r )、 下線は,より~font-sizeが大きい子孫~textを切るように引かれることになる。 したがって、 ~UAによる子孫~内容の考慮は,~typographyをより良くする結果になる。 ◎ Note, since line decorations can span elements with varying font sizes and vertical alignments, the best position for a line decoration is not necessarily the ideal position dictated by the decorating box. For example, an overline positioned to a small font will effectively become a line-through if the element contains text in a significantly larger font-size. Even for underlines, if the text is not aligned to the alphabetic baseline (for example, in vertical typesetting styles, text is aligned by its central baseline by default [CSS-WRITING-MODES-4]) an underline will cut through descendant text of a larger font-size. UA consideration of descendant content will therefore result in better typography.
~UAは、 線の[ 位置, 太さ ]に対し: ◎ UAs\
- 次のいずれかにより,`装飾ng~box$がズラされたときは、 線の位置をズラされた計量に合致するよう調整するモノトスル: ⇒# `baseline$v 以外の値をとる `vertical-align$p 【!`CSS2$r 】/ `font-variant-position$p `CSS-FONTS-3$r を介して[ 下付文字/上付文字 ]化された ◎ must adjust line positions to match the shifted metrics of decorating boxes shifted with vertical-align values other than baseline [CSS2] or subscripted/superscripted via font-variant-position [CSS-FONTS-3],\
- 線の[ 位置, 太さ ]を`装飾ng~box$の子孫の【装飾~用の】~styleに呼応して`調整しない^emモノトスル (そうであっても、 そのように~styleされていない子孫を収容するためとして, 位置を`調整してもヨイ^em — 上で注記したような、 単に異なる~font~sizeで植字されるものがある場合など)。 ◎ but must not adjust the line position or thickness in response to descendants of a decorating box that are so styled (even though it may adjust the position to accommodate descendants that are not so styled, such as those merely typeset in a different font size as noted above).\
これは、[ 上付文字や下付文字が(下線, 打消線【!struck through】, 等々で)適正に装飾される ]ことを許容する一方で,[ 先祖による装飾の位置決めが,それらの~styleにより歪められたり分断される ]ことを防止する。 ◎ This allows superscripts and subscripts to be properly decorated (underlined, struck through, etc.) but prevents them from distorting or breaking the positioning of such decorations on their ancestors.
"1st" における上付文字 "st" だけに対する下線は,上付文字の直下に描かれる一方で、 ~text全体に対する下線は,全部的~sizeの~textに適切な位置に描かれる。 ◎ An underline for just the superscript 'st' in '1st' is drawn just below the superscript, whereas an underline for the entire text is drawn at the appropriate position for full-size text.
2.9.1. ~text装飾~線の添削とズラし: `text-decoration-inset^p ~prop
この~propは、 装飾線の両端(始端, 終端)を調整する。 正な値は、 装飾を削るよう,両端を内方へ移動する。 負な値は、 装飾を拡張するよう,両端を外方へ移動する。 ◎ This property adjusts the start and end endpoints of line decorations. Positive values move an endpoint inward, trimming the decoration; negative values move it outward, extending the decoration.
これは、 当の`装飾ng~box$により描かれる すべての~text装飾~線を制御するが, 先祖により描かれる~text装飾~線は制御しない。 2 個の成分~値が与えられた場合、[ `始端$, `終端$ ]の順に適用される。 各種 値の意味は: ◎ It controls all text decoration lines drawn by this decorating box, but not any text decoration lines drawn by its ancestors. If two component values are given, the first applies to the start and the second to the end. Values have the following meanings:
- `length$t
- 影響される`装飾線$の両端を調整する。 正な値は、 両端を内方へ移動する(削る)。 負な値は、 両端を外方へ移動する(拡張する)。 ◎ Adjusts the start or end endpoint of the affected line decorations. Positive values move the endpoint inward (trimming), negative values move it outward (extending).
-
次の例は、 ~~追加された太い下線を~textの終端へ向けて `1em^v だけ~offsetする ◎ The following example offsets an extra thick underline 1em endwards with respect to the text
h1 { text-decoration: underline 0.3em rgb(36 148 187 / 0.25)【!rgba(36,148,187,0.25)】; text-decoration-inset: 1em -1em; } - `auto@v
- ~UAが,~insetする量を選ぶ — 隣合う 2 個の要素の下線が一致していた【!identical underlined】としても、 1 本の下線として現れないことを確保するよう。 (これは、 下線が約物の形を成す中国語において,重要になる。) ◎ The UA chooses an inset amount that ensures that if two identical underlined elements appear side-by-side they do not appear to have a single underline. (This is important in Chinese, where underlining is a form of punctuation.)
-
この中国語~文字~並びの下線は、 隣接な 2 つの下線が引かれた要素の合間に間隙がある。 ◎ An underline below a series of Chinese characters has a gap between two adjacent underlining elements.
`<u>石井</u><u>艾俐俐</u>^c に対する `text-decoration-inset$p: `auto$v◎ text-decoration-inset: auto for <u>石井</u><u>艾俐俐</u>
~text装飾の両端に対する調整は、 `box-decoration-break$p の~subjectになる — その値に応じて: ◎ The adjustment of the text decoration’s endpoints is subject to box-decoration-break:
- `slice$v (既定) ⇒ 両端に対する調整は、[ 最初の断片の`始端$辺, 最後の断片の`終端$辺 ]に限り適用される。 ~insetする量が断片の長さを超える場合、 他の断片へ累積され得る~may。 ◎ for slice (the default) endpoint adjustment is only applied to the start edge of the first fragment and the end edge of the last fragment, and may accumulate to other fragments if the amount of the inset is more than the length of the fragment.
- `clone$v ⇒ 両端に対する調整は、 各~断片に独立に適用される。 ◎ for clone endpoint adjustment is applied to each fragment independently.
2.10. ~text装飾~線の連続性: `text-decoration-skip^p 略式~prop, その下位prop
~CSS~WGは、 飛法の機能性を個々の~propに分割するものと解決した — `along the lines of^en `text-decoration-skip-ink$p 【?】, その~cascade法の挙動を改善するため。 `843$issue における論点と`解決@https://lists.w3.org/Archives/Public/www-style/2017Feb/0049.html$ を見よ。 この節は,大まかな草案であり、 まだ~CSS~WGにより審査されてはいない。 ◎ The CSSWG resolved to be split skipping functionality into individual properties along the lines of text-decoration-skip-ink, to improve its cascading behavior. See discussion and resolution. This section is a rough draft and has not yet been vetted by the CSSWG
`text-decoration-skip$p ~propと その下位prop ( `text-decoration-skip-self$p, `text-decoration-skip-box$p, `text-decoration-skip-spaces$p, `text-decoration-skip-ink$p )は、 `装飾ng~box$である[ 要素またはその先祖 ]による装飾線における途切れを制御する。 値 `none@v は、 すべての下位propを `none^v に設定する。 値 `auto@v は、 すべての下位propを 各自の初期~値に設定する。 ◎ The text-decoration-skip property and its sub-properties (text-decoration-skip-self, text-decoration-skip-box, text-decoration-skip-spaces, text-decoration-skip-ink) control interruptions in line decorations for which the element or an ancestor is the decorating box. The none value sets all sub-properties to none, and the auto value sets all sub-properties to their initial values.
この `none$v の定義は~Web互換になるか? ~Web互換性を得るには `ink^v 値も追加する必要があるか? ◎ Is this none definition Web-compatible? Do we also need to add an ink value for Web-compat?
注記: これらの~propは,継承される。 また、 子孫~要素を異なる設定にし得る。 ◎ Note that these properties inherit and that descendant elements can have a different setting.
~HTML用の既定の~UA~stylesheetに,次に挙げる追加が為された: ◎ The following addition is made to the default UA stylesheet for HTML:
ins, del { text-decoration-skip: none; }
`text-decoration-line$p ~propの値が[ `spelling-error$v1 / `grammar-error$v1 ]のときは、 ~UAは,これらの どの~propの値も無視してもヨイ。 ◎ When the value of the text-decoration-line property is either spelling-error or grammar-error, the UA may ignore any or all of these properties.
2.10.1. 装飾【!spaces】の飛法: `text-decoration-skip-self^p ~prop
この~propは、 先祖により描かれる~text装飾~線が[ 伝播される/要素をまたぐ【または飛ばす】ように描かれる ]かどうかを指定する。 各種~値の意味は: ◎ This property specifies whether any text decoration lines drawn by its ancestors are propagated to or drawn across the element. Values have the following meanings:
- `auto@v
- 当の要素が`不可分な行内$(画像や行内~塊など)である場合、 当の要素を(その~margin~box全体にわたり)飛ばす。 ◎ Skip this element (its entire margin box) if it is an atomic inline (such as an image or inline-block).
- `skip-all@v
- 当の要素を(その~margin~box全体にわたり)無条件に飛ばす。 当の要素をまたぐように描くことも, 当の要素へ伝播することもない。 ◎ Skip this element (its entire margin box) unconditionally. Don’t draw across it, don’t propagate to it.
- `skip-underline@v
- 先祖の下線を描くときは、 当の要素を(その~margin~box全体にわたり)無条件に飛ばす。 ◎ Skip this element (its entire margin box) unconditionally when drawing ancestor underlines.
- `skip-overline@v
- 先祖の上線を描くときは、 当の要素を(その~margin~box全体にわたり)無条件に飛ばす。 ◎ Skip this element (its entire margin box) unconditionally when drawing ancestor overlines.
- `skip-line-through@v
- 先祖の打消線を描くときは、 当の要素を(その~margin~box全体にわたり)無条件に飛ばす。 ◎ Skip this element (its entire margin box) unconditionally when drawing ancestor line-throughs.
- `no-skip@v
- 先祖`装飾ng~box$からの`装飾線$は、 当の~boxにも無条件に適用される: 当の~boxが`不可分な行内$である場合、 それが~textであったかのように,それをまたぐように描かれる。 他の場合、 通例的な規則に則って,当の~boxへ伝播される 【すなわち, `auto$v と同じに挙動する】。 ◎ Line decorations from ancestor decorating boxes are applied to this box unconditionally: drawn across it as if it were text if it is an atomic inline, or propagated to it according to the usual rules if it is not.
- 注記: この値は、[ 必要yなら,画像を~textとして扱う ]ために供される — 例えば、 ~Unicodeには符号化されない~glyphを表現するとき。 ◎ Note: The no-skip value is provided to treat images as text when that is necessary, for example when representing glyphs that are not encoded in Unicode.
~keyword `skip-all$v 用の`算出d値$は、 `skip-underline skip-overline skip-line-through^v になる。 しかしながら,この組合nは、 `直列化-@~CSSOM1#serializing-css-values$されるときは, `skip-all^v (最短な直列化)になることに注意。 ◎ The skip-all keyword computes to skip-underline skip-overline skip-line-through. Note, however, that this combination will serialize as skip-all (shortest serialization).
2.10.2. 空間の飛法: `text-decoration-skip-box^p ~prop
~CSS~WGは `text-decoration-skip$p を下位propたちに分割するものと解決したが、 この~prop用の値は,まだ~CSS~WGにより審査されてはいない。 ◎ The CSSWG resolved to split text-decoration-skip into sub-properties, but this value set has not yet been vetted by the CSSWG.
この~propは、[ 要素に影響している~text装飾は、 要素の~box区画を成すどの部分を飛ばすモノトスルか ]を指定する。 それは、 先祖により描かれる~text装飾~線のみを制御する。 各種~値の意味は: ◎ This property specifies what parts of the element’s box area any text decoration affecting the element must skip over. It controls only text decoration lines drawn by its ancestors. Values have the following meanings:
- `none@v
- 何も飛ばされない: 先祖`装飾ng~box$からの装飾線は、 当の~boxの~margin区画の端から端まで描かれる。 ◎ Skip nothing: line decorations from ancestor decorating boxes are drawn from margin edge to margin edge.
- `all@v
- 当の~box用に先祖`装飾ng~box$に適用された~text装飾~線を描くときは、 当の~boxの[ ~margin, ~border, ~padding ]区画を飛ばして,当の~boxの`内容~区画$の中に限り描く。 ◎ When drawing text decoration lines applied to an ancestor decorating box, skip over the box’s own margin, border, and padding areas and only draw line decorations within its content area.
- この値による効果は、 先祖により課される装飾に限られる — `装飾ng~box$が自前の~box装飾~越しに描くことは決してない。 ◎ This value only has an effect for decorations imposed by an ancestor; a decorating box never draws over its own box decoration.
2.10.3. ~spaceの飛法: `text-decoration-skip-spaces^p ~prop
初期~値は、 ~Web互換性を得るため, `none$v にするべきか? そうしない場合、 少なくとも[ `ins$e, `del$e ]要素には,~UA既定の~stylesheet内で `none^v がアテガわれるべきである。 `4653$issue も見よ。 ◎ Should the initial value be none for Web-compat? If not, INS and DEL at least should be assigned none in the UA default stylesheet. See also Issue 4653.
この~propは、 ~text装飾は~spaceを飛ばすかどうかを指定する。 これは、[ 要素, その先祖 ]により描かれる すべての~text装飾~線を制御する。 各種~値の意味は: ◎ This property specifies whether text decoration skips any spaces. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. Values have the following meanings:
- `none@v
- `~space体$は飛ばされない。 それらは他の文字と同様に装飾される。 ◎ Spacers are not skipped. They are decorated just like any other character.
- `all@v
- [ `~space体$, `単語~分離子$ ]に加えて,隣接な[ `letter-spacing$p / `word-spacing$p ]もすべて飛ばす。 ◎ Skip all spacers and all word separators plus any adjacent letter-spacing or word-spacing.
- `start@v
- 行lの始端に所在する`~space体$に加えて,隣接な[ `letter-spacing$p / `word-spacing$p ]もすべて飛ばす。 ◎ Skip all spacers, plus any adjacent letter-spacing or word-spacing, when located at the start of the line.
- `end@v
- 行lの終端に所在する`~space体$に加えて,隣接な[ `letter-spacing$p / `word-spacing$p ]もすべて飛ばす。 ◎ Skip all spacers, plus any adjacent letter-spacing or word-spacing, when located at the end of the line.
この~propの目的における `~space体@ ( `spacer^en ) とは、 次を満たす`~typographic文字~単位$である ⇒ [ `~Unicode一般~字種$ `Zs^uc に属する ]~AND[ `202F^U `NARROW NO-BREAK SPACE^cn でない ] ◎ For the purpose of this property, a spacer is any typographic character unit from Unicode General Category Zs except U+202F NARROW NO-BREAK SPACE.
2.10.4. ~glyphの飛法: `text-decoration-skip-ink^p ~prop
この~propは、[ 上線/下線 ]が~glyphに交叉するとき,どう描かれるかを制御する。 これは、 子孫~boxが異なる~styleを指定していても, この要素から出生しているすべての装飾に影響する。 ◎ This property controls how overlines and underlines are drawn when they cross over a glyph. It affects all decorations originating from this element even if descendant boxes specify a different style.
可能化されたときは、 ~glyphが描かれる所を飛ばす — ~text装飾が~glyphに交叉する所では、 ~textの形状が~~透けるよう,装飾~線を途切らす。 ~UAは、 ~glyph外形線の両~側にも小さな~~隙間を~~空けるモノトスル。 ◎ When enabled, decoration lines skip over where glyphs are drawn: interrupt the decoration line to let the shape of the text show through where the text decoration would otherwise cross over a glyph. The UA must also skip a small distance to either side of the glyph outline.
~Myanmar~textを通る~alphabeticな下線は、 `alphabetic$bL 基底線の下に出る,結合~文字の[ ~descenderや縦方向~描線 ]の周りを飛ばすように引かれる。 ◎ An alphabetic underline through Myanmar text skips around descenders and the vertical strokes of combining characters that drop below the alphabetic baseline.
表語-用字系は、 `auto$v をとる下では,~inkを飛ばさないことが求まれる。 この挙動は,どう定義できるか? 飛ばさないことが求まれる用字系は他にもあるか? `auto^v がどう働くかを述べる何らかの規範的な~textが必要である。 `telcon minutes@https://lists.w3.org/Archives/Public/www-style/2017Feb/0069.html$en, `alreq#86@https://github.com/w3c/alreq/issues/86$en, `1288$issue を見よ。 ◎ Ideographic scripts do not want to skip when auto. How can we define this behavior? Are there more scripts wanting not to skip? Need some normative text describe how auto works. See telcon minutes, alreq#86, csswg#1288
この~propは、[ 上線, 下線 ]にしか適用されない — 打消線は、 常に連続的になる。 ◎ This property only applies to overlines and underlines; line-throughs are always continuous.
- `auto@v
- UAは、[ 下線/上線 ]が~glyph~inkに交叉する箇所では, 線が途切れるようにしても`ヨイ^em — ~glyph外形線の両側にも~~隙間が~~空くよう(上の図)。 ~UAは、[ 所与の範囲を成す内容に~inkを飛ばす挙動を適用するかどうか ]を決定するときには, 当の~textの用字系を考慮するベキである (下の注記を見よ)。 ◎ UAs may interrupt underlines and overlines where the line would cross glyph ink and to some distance to either side of the glyph outline. UAs should consider the script of the text (see note below) when determining whether to apply ink-skipping behavior to a given range of content.
- `all@v
- UAは、[ 下線/上線 ]が~glyph~inkに交叉する箇所では, 線が途切れるようにする`モノトスル^em — ~glyph外形線の両側にも~~隙間が~~空くよう(上の図)。 ◎ UAs must interrupt underlines and overlines where the line would cross glyph ink and to some distance to either side of the glyph outline.
- `none@v
- ~UAは、[ 下線/上線 ]が~glyphに交叉する箇所であっても, 線を途切らすことなく連続的に描く`モノトスル^em。 ◎ UA must draw continuous underlines and overlines, without interruptions when they cross over a glyph.
注記: 実装~経験から、 下線が引かれた~textが表語-文字を含むときには, ~inkを飛ばす挙動は望ましくない結果を生産することが多いことが示されている — 下線~位置が ほぼ すべての~glyphに衝突して、 下線が行lの所々でしか描画されないことが多いので (孕まれる~fontや~UAにも依存するが)。 ◎ Note: Implementation experience shows that ink-skipping behavior often produces undesirable results when underlined text includes ideographic characters, as the underline position (depending on the font and user agent involved) often clashes with almost all the glyphs, such that only occasional fragments of the line remain to be rendered.
作者は、 原則として[ `text-underline-position$p (あるいは,場合によっては `text-underline-offset$p ) を利用して, 下線を~glyphと衝突しないよう より低い位置へ移動する ]ことにより,これを解決することもできるが、 常に実現可能ではない — ~UAがこれらの~propを~supportしていて,作者が その能性を自覚していても。 特に,ある~pageが利用者が生成した任意な内容を包含するとき、 その設計を担当した作者は,~CJK内容が在るかどうか知り得ないこともある。 加えて,複数の用字系が混在する内容においては、[ ~CJK内容~用には,きちんと働くよう設計された下線~位置 ]が[ ~textの大半を~CJK以外が占める場合 ]には不良な見かけになり得る。 ◎ In principle, this could be resolved by authors using text-underline-position: under (or possibly text-underline-offset) to move the underline to a lower position that does not clash with the glyphs, but this is not always feasible, even if the user agent supports these properties and the author is aware of their potential. In particular, when a page contains arbitrary user-generated content, the author responsible for the design may not know whether CJK content will be present. And with mixed-script content, an underline position designed to work well for CJK content may look bad if the majority of the text is non-CJK.
したがって,~inkを飛ばす挙動を実装する~UAは、 `auto$v が効果を発揮しているときは, ~CJK文脈において それを行うことを控える`ベキ^emである (作者は、 ~inkを飛ばす挙動を~CJK内容に`適用する^emよう求めるなら, 値 `all$v 【!`always^v】 を利用して それを明示的に要請できる)。 ◎ Therefore, when auto is in effect, a UA that implements ink-skipping should refrain from doing so in CJK contexts. (Authors who do want ink-skipping applied to CJK content can use the always value to explicitly request this.)
このことは、 首に[ ~OR↓ を満たす文字 ]に対しては, ~inkを飛ばす挙動を`適用しない^emことを意味する ◎ Primarily, this means not applying ink-skipping\
- その~Unicode `Script$uc 【用字系】~prop ~IN { `Han^uc, `Hiragana^uc, `Katakana^uc, `Bopomofo^uc, `Hangul^uc } (~CJK用字系) 【順に:漢字, 平仮名, 片仮名, 注音符号, ハングル】 ◎ for characters whose Unicode Script property is any of the CJK scripts Han, Hiragana, Katakana, Bopomofo, or Hangul, or\
- [ その~Unicode `Script$uc ~prop ~IN { `Inherited^uc, `Common^uc } ]~AND[ その~Unicode `ScriptExtensions$uc ~propは、 ~CJK用字系【前項に挙げたもの】を 1 個以上含む ] ◎ for characters whose Script property is Inherited or Common, and whose ScriptExtensions property includes one or more of the CJK scripts.
加えて, ~Unicode `Script^uc ~prop ~IN { `Common^uc, `Inherited^uc } を満たす文字(首に汎用な約物や記号)は、 ~CJK用字系~内容を成す連なりの一部として利用され得ることを考慮する必要があり, 所与の用字系を成す連なりの中のすべての~textを一貫した仕方で扱うことが望ましい。 したがって,~UAは、 `UAX24$r ~Unicode `Script^uc ~propの`実装~注記@https://www.unicode.org/reports/tr24/#Usage_Model$ — 特にその § 5.1, § 5.2 — に述べられるとおりに, ~textが どの用字系を成す連なりになるかを解決する`ベキ^emである。 ~UAは、 そこに述べられる経験則(または用字系の類似な分析)を適用した後に, ~CJK用字系に属するものと決定された範囲~内にある すべての~textに対し, ~inkを飛ばす挙動を不能化する`ベキ^emである。 ◎ In addition, characters with a Unicode script property of Common and Inherited (primarily generic punctuation and symbols) need to be considered, as these may be used as part of a run of CJK-script content, and it is desirable to treat all text within a given script run in a consistent way. Therefore, the UA should resolve the text into script runs as described in the “Implementation Notes” of [UAX24] “Unicode Script Property”, in particular subsections 5.1 and 5.2. After applying the heuristics described there (or a similar analysis of scripts), the UA should disable ink-skipping for all ranges of text that are determined to be in a CJK script.
~inkを飛ばす挙動を( `auto$v の効果があるときに)既定で不能化する方が好ましい用字系は、 他(~CJK以外)にもあるか? たぶん ~Yi?~Arabic? ( `1288$issue における論点も見よ)。 ◎ Are there other (non-CJK) scripts where it would be preferable to disable ink-skipping by default (when auto is in effect)? Perhaps Yi? Arabic? (See also discussion in Issue 1288.)
2.10.5. 途切れの形状付け
~UAは、[ 下線/上線 ]が~glyph境界で途切れるときには,その箇所の切り口の形状が~glyphの形状をナゾるようにするベキである。 ◎ When the UA interrupts underlines or overlines at glyph boundaries, the shape of the line at that boundary should follow the shape of the glyph.
注記: この仕様は、[ ~glyphの “形状をナゾる” ための手法 ]として特定0の何かを意図的に義務付けない — ~UAが、 適切な措置の下で,美観や処理能の考慮点を取扱えるようにするため。 例えば,~UAは、[ ~sizeが一定の閾値を下回るときには,処理能の理由から 線の末端形状を方形と見做す ]あるいは[ 末端形状に台形を利用して曲線を近似する ]こともできる — とりわけ、 線の装飾が細いときには。 美観について言えば、 ~UAは,[ ~glyph境界が線の太さの一部のみに交差するとき/ 傾きが水平に近いとき ]に何が起こるかも考慮するかもしれない — 曲線を正確にナゾることによる結果の下線は、 ~typographic的に見苦しい端切れにもなり得る。 ~glyphに囲込まれた区画の中に線を示すかどうかも、 また別の考慮になる。 ◎ Note, this specification intentionally does not mandate a particular method for “following the shape” of the glyph so that UAs can take appropriate measures to handle aesthetic and performance considerations. For example, a UA could assume square line endings below a certain size threshold for performance reasons; or use trapezoidal endings to approximate curves, especially on thinner line decorations. In terms of aesthetic considerations, the UA might also consider what happens when the glyph boundary intersects only part of the line thickness or is slanted close to the horizontal—following the curve exactly could result in typographically-awkward wisps of underline. Whether to show the line within enclosed areas of a glyph is yet another consideration.
例えば,[ 単語 “goal” の “g” を成す輪っか(下側の方)を突き抜く下線 ]においては、 輪っかの中に下線の太さ全体が見えるかどうかは, 下線の位置や太さに依存するであろう。 この例では、 ~glyphで~~覆い~~隠された下線を 2 つの位置に示す。 図左の下線は、 “g” を成す輪っかの中央を通過し, 輪っかの中を埋めている下線の太さが全部的に見える。 図右の下線は、 少し低めにあるので,輪っかの中では太さが部分的にしか見えない。 ◎ Take, for example, the word “goal” with an underline striking through the bottom loop of the “g”. Depending on the position and thickness of the underline, we might see the entire thickness of the underline, or only part of it within the “g”. This example shows a masked-out underline in two positions. In the left pair the underline passes through the center of the bowl of the “g”: the full thickness of the underline shows through the center, filling it. In the right pair the underline is slightly lower, and thus the portion of the underline within the “g” can only show a partial thickness.
3. 圏点~用の追加的な制御
東Asian文書は、 ~text連なりを強勢するとき,伝統的に各~glyphの傍らに 【圏点( `emphasis mark^en, 略して `mark^en )と呼ばれる】 小さな記号を利用する。 例えば: ◎ East Asian documents traditionally use small symbols next to each glyph to emphasize a run of text. For example:
日本語において~textの傍らに現れる強勢の例 ◎ Example of emphasis in Japanese appearing over the text
そのような圏点0を~textに適用するためとして、 `text-emphasis$p 略式~prop, および対応する下位prop[ `text-emphasis-style$p, `text-emphasis-color$p ]を利用できる。 それらとは別々に継承される `text-emphasis-position$p ~propは、 圏点の位置を~textに~~相対的に設定することを許容する。 ◎ The text-emphasis shorthand, and its text-emphasis-style and text-emphasis-color longhands, can be used to apply such marks to the text. The text-emphasis-position property, which inherits separately, allows setting the emphasis marks’ position with respect to the text.
~size/位置における連続性については、 `1892$issue も見よ。 ◎ See also issue about continuity in size/position.
3.1. 圏点~style: `text-emphasis-style^p ~prop
要素の~textに適用する圏点は、 この~propで与える。 各種~値の意味は: ◎ This property applies emphasis marks to the element’s text. Values have the following meanings:
- `none@v
- 圏点は無い。 ◎ No emphasis marks.
- `filled@v
- 形状をベタ色で塗潰す。 ◎ The shape is filled with solid color.
- `open@v
- 形状を中空(縁取り)にする。 ◎ The shape is hollow.
- `dot@v
- 小さな丸を圏点0として表示する。 塗潰しの小丸は `2022^U / 縁取りの小丸は `25E6^U。 ◎ Display small circles as marks. The filled dot is U+2022 '•', and the open dot is U+25E6 '◦'.
- `circle@v
- 大きい丸を圏点0として表示する。 塗潰しの丸は `25CF^U / 縁取りの丸は `25CB^U。 ◎ Display large circles as marks. The filled circle is U+25CF '●', and the open circle is U+25CB '○'.
- `double-circle@v
- 二重丸を圏点0として表示する。 塗潰しの二重丸は `25C9^U / 縁取りの二重丸は `25CE^U 。 Display double circles as marks. The filled double-circle is U+25C9 '◉', and the open double-circle is U+25CE '~25CE'.
- `triangle@v
- 三角を圏点0として表示する。 塗潰しの三角は `25B2^U / 縁取りの三角は `25B3^U。 ◎ Display triangles as marks. The filled triangle is U+25B2 '▲', and the open triangle is U+25B3 '△'.
- `sesame@v
- ゴマを圏点0として表示する。 塗潰しのゴマは `FE45^U / 縁取りのゴマは `FE46^U。 ◎ Display sesames as marks. The filled sesame is U+FE45 '﹅', and the open sesame is U+FE46 '﹆'.
- `string$t
- 所与の文字列を圏点0として表示する。 ◎ Display the given string as marks.\
- 作者は、 この値に複数の`文字$(書記素~cluster)を指定するベキでない。 ~UAは、 そのような文字列を切落しても無視してもヨイ。 ◎ Authors should not specify more than one character in <string>. The UA may truncate or ignore strings consisting of more than one grapheme cluster.
形状~keywordが指定された下で[ `filled$v / `open$v ]が指定されなかった場合、 `filled$v に算出される【!見做される】。 [ `filled$v / `open$v ]のみが指定された場合、 形状~keywordは[ `横書き~mode$の下では `circle$v / `縦書き~mode$の下では `sesame$v ]に算出される。 ◎ If a shape keyword is specified but neither of filled nor open is specified, filled is assumed. If only filled or open is specified, the shape keyword computes to circle in horizontal typographic modes and sesame in vertical typographic modes.
圏点0は、 要素の~font設定群に加えて `ruby$v 特能も利用する下で, ~size 50% に縮小して描かれるベキである。 [ これらの~glyphを有さない~font/ これらの符号位置による圏点に不適切な~sizeを利用する~font ]もあるので、 ~UAは, 圏点に適することが既知な~fontを利用することにしても, 代わりになる圏点0を合成してもヨイ。 圏点0は、 `縦書き~mode$においては正立に保つモノトスル — ~CJK文字の様に[ `書字~mode$に合致するよう回転される ]ことはない。 `縦組み$における`横書き~mode$における圏点0の方位は、 この~levelでは未定義とする (が、 確たる利用事例が発生したなら,将来の~levelにおいて定義されよう)。 ◎ The marks should be drawn using the element’s font settings with the addition of the ruby feature and the size scaled down 50%. However, since not all fonts have all these glyphs, and some fonts use inappropriate sizes for emphasis marks in these code points, the UA may opt to use a font known to be good for emphasis marks, or the marks may instead be synthesized by the UA. Marks must remain upright in vertical typographic modes: like CJK characters, they do not rotate to match the writing mode. The orientation of marks in horizontal typographic modes of vertical writing modes is undefined in this level (but may be defined in a future level if definitive use cases arise).
注記: 圏点に適する~fontの例として、 `Kenten Generic OpenType Font@https://github.com/adobe-fonts/kenten-generic$en ( Adobe の~opensource) が挙げられる — それは、 圏点~用に特別に設計されている。 ◎ Note: One example of good fonts for emphasis marks is Adobe’s open source, Kenten Generic OpenType Font, which is specially designed for the emphasis marks.
圏点0は各`~typographic文字~単位$ごとに 1 個ずつ描かれる。 ただし、 次に挙げる`文字$には,圏点は描かれない: ◎ The marks are drawn once for each typographic character unit. However, emphasis marks are not drawn for:
- `単語~分離子$, または~Unicode分離子~class( `Z*^uc )に属する`文字$ (ただし、 何らかの結合~文字と結合された~space用には,`圏点は描かれる^emことに注意。) 【 `Z*^uc の `*^uc は~wildcard。次の `P*^uc も同様。】 ◎ Word separators or other characters that belong to the Unicode separator classes (Z*). (But note that emphasis marks are drawn for a space that combines with any combining characters.)
- 約物 — 特定的には、 `~Unicode一般~字種$ `P*^uc に属していて,次に挙げるどの記号にも NFKD 正規化- `UAX15$r されないもの ⇒# `0023^U `NUMBER SIGN^cn, `0025^U `PERCENT SIGN^cn, `2030^U `PER MILLE SIGN^cn, `2031^U `PER TEN THOUSAND SIGN^cn, `066A^U `ARABIC PERCENT SIGN^cn, `0609^U `ARABIC-INDIC PER MILLE SIGN^cn, `060A^U `ARABIC-INDIC PER TEN THOUSAND SIGN^cn, `0026^U `AMPERSAND^cn, `204A^U `TIRONIAN SIGN ET^cn, `0040^U `COMMERCIAL AT^cn, `00A7^U `SECTION SIGN^cn, `00B6^U `PILCROW SIGN^cn, `204B^U `REVERSED PILCROW SIGN^cn, `2053^U `SWUNG DASH^cn, `303D^U `PART ALTERNATION MARK^cn ◎ Punctuation--specifically, any characters that belong to the Unicode P* general category and do not NFKD normalize [UAX15] to any of the following symbols: ◎ # U+0023 NUMBER SIGN % U+0025 PERCENT SIGN ‰ U+2030 PER MILLE SIGN ‱ U+2031 PER TEN THOUSAND SIGN ٪ U+066A ARABIC PERCENT SIGN ؉ U+0609 ARABIC-INDIC PER MILLE SIGN ؊ U+060A ARABIC-INDIC PER TEN THOUSAND SIGN & U+0026 AMPERSAND ⁊ U+204A TIRONIAN SIGN ET @ U+0040 COMMERCIAL AT § U+00A7 SECTION SIGN ¶ U+00B6 PILCROW SIGN ⁋ U+204B REVERSED PILCROW SIGN ⁓ U+2053 SWUNG DASH 〽️ U+303D PART ALTERNATION MARK
- [ 制御~code/未割当てな文字 ]用の~Unicode~class( `Cc^uc, `Cf^uc, `Cn^uc )に属するもの。 ◎ Characters belonging to the Unicode classes for control codes and unassigned characters (Cc, Cf, Cn).
注記: どの文字に圏点0が付与されるかの制御は、 ~level 4 にて追加されることになる。 (約物の~listも,さらに精緻化され得る — 特に~CJKでない約物。) ◎ Note: Control over which characters are marked will be added in Level 4. (The list of punctuation may also be further refined, particularly for non-CJK punctuation.)
【 ~level 4 は,この文書なので、 この注記は余計であろう — ~level 3 にも同じ注記があることに加え、 該当する制御として `text-emphasis-skip$p が,この文書に定義されているので。 】
3.2. 圏点の色: `text-emphasis-color^p ~prop
この~propは、 圏点の前景~色を指定する。 ◎ This property specifies the foreground color of the emphasis marks.
注記: `currentcolor$v ~keywordは、 それ自身に算出され, 継承が遂行された後に【当の要素の】 `color$p の値に解決される。 これは、 `text-emphasis-color$p は,既定では~textの `color$p に合致することを意味する — `color$p が各~要素にわたって変化するときでも。 ◎ Note: currentcolor keyword computes to itself and is resolved to the value of color after inheritance is performed. This means text-emphasis-color by default matches the text color even as color changes across elements.
3.3. 圏点: `text-emphasis^p 略式~prop
この~propは、[ `text-emphasis-style$p, `text-emphasis-color$p ]を 1 個の宣言で設定する略式~propである。 省略された値は、 各自の初期~値に設定される。 ◎ This property is a shorthand for setting text-emphasis-style and text-emphasis-color in one declaration. Omitted values are set to their initial values.
注記: この略式~propは、 `text-emphasis-position$p を設定し直すことはない。 同じ`内容~言語$の下では、 形状や色は概して文書~全体を通して変わる一方で, 位置は一貫することが多いので。 したがって、 位置は独立に継承されるベキである。 ◎ Note that text-emphasis-position is not reset in this shorthand. This is because typically the shape and color vary, but the position is consistent for a particular language throughout the document. Therefore the position should inherit independently.
3.4. 圏点の位置: `text-emphasis-position^p ~prop
この~propは、 圏点がどこに描かれるかを述べる。 [ `right$v | `left$v ] ~~成分が省略された場合の既定は `right$v とする。 各種 値の意味は: ◎ This property describes where emphasis marks are drawn at. If [ right | left ] is omitted, it defaults to right. The values have following meanings:
- `over@v
- `横書き~mode$において圏点0たちを ~textの上面に描く。 ◎ Draw marks over the text in horizontal typographic modes.
- `under@v
- `横書き~mode$において圏点0たちを ~textの下面に描く。 ◎ Draw marks under the text in horizontal typographic modes.
- `right@v
- `縦書き~mode$において圏点0たちを ~textの右端に描く。 ◎ Draw marks to the right of the text in vertical typographic modes.
- `left@v
- `縦書き~mode$において圏点0たちを ~textの左端に描く。 ◎ Draw marks to the left of the text in vertical typographic modes.
圏点は、 各~文字に,~ruby注釈~textとして — 正確に, `text-emphasis-position$p により与えられる~ruby位置に, ~ruby整列は中央寄せにされて — アテガわれていたかのように描かれる。 この位置は、 下線や上線による装飾と競合することになる場合には,調整され得る/してもヨイことに注意。 ◎ Emphasis marks are drawn exactly as if each character was assigned the mark as its ruby annotation text with the ruby position given by text-emphasis-position and the ruby alignment as centered. Note that this position may be adjusted if it would conflict with underline or overline decorations.
行l高さに対する圏点の効果は、 ~ruby~textに対するときと同じである。 ◎ The effect of emphasis marks on the line height is the same as for ruby text.
注記: 圏点に選好される位置は、 `内容~言語$に依存する。 例えば、 日本語において選好される位置は `over right^v である。 中国語において選好される位置は `under right^v である。 次の規範的でない表tに[ 中国語/日本語 ]に選好される圏点の位置を要約する: ◎ Note, the preferred position of emphasis marks depends on the language. In Japanese for example, the preferred position is over right. In Chinese, on the other hand, the preferred position is under right. The informative table below summarizes the preferred emphasis mark positions for Chinese and Japanese:
| `内容~言語$ ◎ Language | 選好される位置 ◎ Preferred position | |
|---|---|---|
| 横書き ◎ Horizontal | 縦書き ◎ Vertical | |
| 日本語/韓国語/~Mongolian | `over$v
圏点は、 横書き日本語~textにおいては,強勢される各~文字の上面に現れる。 ◎ Emphasis marks appear over each emphasized character in horizontal Japanese text. | `right$v
圏点は、 縦書き日本語~textにおいては,強勢される各~文字の右に現れる。 ◎ Emphasis marks appear on the right of each emphasized character in vertical Japanese text. |
| 中国語 | `under$v
圏点は、 横書き簡体~中国語~textにおいては,強勢される各~文字の下に現れる。 ◎ Emphasis marks appear below each emphasized character in horizontal Simplified Chinese text. | |
文字に適用される圏点は、 同じ位置に~rubyも描かれる場合には,~rubyの外側に配置される。 これには[ `自動で隠される$/空な ]`~ruby注釈$も含まれる。 ◎ If emphasis marks are applied to characters for which ruby is drawn in the same position as the emphasis mark, the emphasis marks are placed outside the ruby. This includes auto-hidden and empty ruby annotations.
この例では、 圏点は 4 個の文字に適用され,うち 2 個は~rubyを伴う。 ~rubyで注釈された文字に対しては,~ruby~textの上に小丸が配置され、 他の文字に対しては,各~文字の上に(~rubyに整列されるよう)小丸が配置される。 ◎ In this example, emphasis marks are applied to 4 characters, two of which have ruby. The dots are placed above each character (aligned with the ruby) for the bare characters, and above the ruby text for the annotated characters.
~HTMLにおいては、 次の~style規則で,~rubyと圏点が競合するときに圏点を隠すこともできる: ◎ Some editors prefer to hide emphasis marks when they conflict with ruby. In HTML, this can be done with the following style rule:
ruby { text-emphasis: none; }
逆に~rubyの方を隠したいときは、 次の~patternで行える: ◎ Some other editors prefer to hide ruby when they conflict with emphasis marks. In HTML, this can be done with the following pattern:
em { text-emphasis: dot; } /*
`em^e 要素~用の `text-emphasis$p を設定する
◎
Set text-emphasis for <em> elements
*/
em rt { display: none; } /*
`em^e 要素の内側にある~rubyを隠す
◎
Hide ruby inside <em> elements
*/
3.5. 圏点を飛ばす: `text-emphasis-skip^p ~prop
この節は、 模索中にある。 また,この~propは、 必要かどうかさえ,まだ明瞭でない — 各~公表版の間で,欲される挙動に相違があるにもかかわらず。 ◎ This section is under brainstorming. It’s also not yet clear if this property is needed quite yet, despite differences in desired behavior among publications.
この~propは、 どの文字に圏点0を描くかを述べる。 各種~値の意味は: ◎ This property describes for which characters marks are drawn. The values have following meanings:
- `spaces@v
- 次に挙げる`文字$を飛ばす ⇒# `単語~分離子$/ ~Unicode分離子~字種( `Z*^uc )に属するもの ◎ Skip word separators or other characters belonging to the Unicode separator category (Z*).\
- (が、 結合~文字と結合された~space用には, `圏点は描かれる^emことに注意)。 ◎ (But note that emphasis marks are drawn for a space that combines with any combining characters.)
- `punctuation@v
- 次に挙げる文字( “約物” )を飛ばす ⇒ `~Unicode一般~字種$ `P*^uc に属する文字のうち, `symbols$v に挙げるもの以外 ◎ Skip punctuation. Punctuation in this definition includes characters belonging to the Unicode P* category that are not defined as symbols (see below).
- `symbols@v
-
次に挙げる文字( “記号” )を飛ばす:
- `~Unicode一般~字種$ `S*^uc に属する`~typographic文字~単位$
- 次に挙げる`~Unicode一般~字種$ `Po^uc に属する`文字$に `NFKD^ 等価なもの `UAX15$r ⇒# `0023^U `NUMBER SIGN^cn, `0025^U `PERCENT SIGN^cn, `2030^U `PER MILLE SIGN^cn, `2031^U `PER TEN THOUSAND SIGN^cn, `066A^U `ARABIC PERCENT SIGN^cn, `0609^U `ARABIC-INDIC PER MILLE SIGN^cn, `060A^U `ARABIC-INDIC PER TEN THOUSAND SIGN^cn, `0026^U `AMPERSAND^cn, `204A^U `TIRONIAN SIGN ET^cn, `0040^U `COMMERCIAL AT^cn, `00A7^U `SECTION SIGN^cn, `00B6^U `PILCROW SIGN^cn, `204B^U `REVERSED PILCROW SIGN^cn, `2053^U `SWUNG DASH^cn, `303D^U `PART ALTERNATION MARK^cn
- `narrow@v
- 次に挙げる文字を飛ばす ⇒ ~Unicode~database `UAX44$r の `East_Asian_Width^uc ~prop `UAX11$r は[ `F^uc( `Fullwidth^uc )/ `W^uc( `Wide^uc ) ]でないもの 【!https://ja.wikipedia.org/wiki/%E6%9D%B1%E3%82%A2%E3%82%B8%E3%82%A2%E3%81%AE%E6%96%87%E5%AD%97%E5%B9%85】 ◎ Skip characters where the East_Asian_Width property [UAX11] of the Unicode database [UAX44] is not F (Fullwidth) or W (Wide).
次に挙げる文字は、 この~propの値が何であれ飛ばされる ⇒ [ 制御~code/未割当てな文字 ]用の~Unicode~class( `Cc^uc, `Cf^uc, `Cn^uc )に属するもの ◎ Characters belonging to the Unicode classes for control codes and unassigned characters (Cc, Cf, Cn) are skipped regardless of the value of this property.
この構文は、 ~UAが~space用の圏点0を描くよう実装することを要求する。 それ用の利用事例はあるのか? ないならば, ~space用に描かれる圏点0を許容しないよう構文を改変するべきか? ◎ This syntax requires UA to implement drawing marks for spaces. Is there any use case for doing so? If not, should we modify the syntax not to allow drawing marks for spaces?
`839$issueにおける初期~値の論点も見よ。 ◎ See also discussion of the initial value.
4. ~textの影: `text-shadow^p ~prop
この~propは、 要素の~textに適用する影~効果たちが成す, ~commaで分離された~listを受容する。 各~値は、 `box-shadow$p `CSS-BACKGROUNDS-3$r 用の値と同様に解釈される。 各~層は、[ 要素の~textと そのすべての~text装飾 ](を組成したもの)に影する。 影~効果は、 最初の影が最上~層になるよう,手前から奥の順に適用される。 したがって、 影が成す層たちは,互いに重なり得る ◎ This property accepts a comma-separated list of shadow effects to be applied to the text of the element. Values are interpreted as for box-shadow [CSS-BACKGROUNDS-3]. Each layer shadows the element’s text and all its text decorations (composited together). The shadow effects are applied front-to-back: the first shadow is on top. The shadows may thus overlay each other.
`box-shadow$p と違って,`拡幅~距離$は、 ~glyph外形線を成す各点から外へ~offsetする距離として厳密に解釈されるので, ボカシ半径に類似な丸められた隅を作成する — 角張ったそれではなく。 負な拡幅~値は妥当でない。 ◎ Unlike box-shadow, the spread distance is strictly interpreted as outset distance from any point of the glyph outline, and therefore, similar to the blur radius, creates rounded, rather than sharp, corners. Negative spread values are invalid.
隅の形状付けを未定義なまま残すか? [`7250$issue] ◎ Leave corner shaping undefined? [Issue #7250]
`外縁~text影@ ( `inset$v ~keywordを伴わずに指定されたもの) は、[ 当の~textが【その輪郭を成す図形で】切抜かれ,周囲の~canvasの上に浮かんでいる ]かのように,~textに影する — ~text~stroke `FILL-STROKE-3$r 【`~textの外形線をなぞる描線@~SVGpainting#TermStroke$】があれば,それも含めて。 `box-shadow$p と違って、 外縁~text影は,影される図形【~textの輪郭を成す図形】で切取られない — ~textが半透明な場合、 図形の中に入る部分は透けて見える。 ◎ Outer text shadows (specified without the inset keyword) shadow the text—including any text stroke [FILL-STROKE-3]—as if it were cut and raised above the surrounding canvas. Unlike box-shadow, outer text shadows are not clipped to the shadowed shape and may show through if the text is partially-transparent.
`内縁~text影@ ( `inset$v ~keywordを伴って指定されもの) は、[ 当の~textが切抜かれ,周囲の~canvasより下に沈んでいる ]かのように,~textに影する — ~text~stroke `FILL-STROKE-3$r があれば,それも含めて。 外縁~text影は、 ~text~strokeがあれば,その内縁~辺の中に限り描かれる。 ◎ Inner text shadows (specified with the inset keyword) shadow the canvas—and any text stroke [FILL-STROKE-3]—as if the text were cut and dropped below the surrounding canvas. They are therefore only drawn within the inner edge of the stroke.
`外縁~text影$は、 要素の[ ~borderや背景(もしあれば) ]と[ ~textや~text装飾 ]の合間にある積層-~levelに塗るモノトスル。 `内縁~text影$は、 要素の[ ~textや~text装飾 ]の~~上層に塗るモノトスル。 ~UAは、 ~text影を[ `積層~文脈$の同じ積層-~levelに属する隣接な要素 ]内の~textの上には塗らないようにするベキである。 (このことは、[ 各~影の正確な積層-~levelは、 当の要素が~borderや背景を有するか否かに依存し得る ]ことを意味する — したがって、 ~text影を積層するときの正確な挙動は,~UAにより定義される)。 ◎ Outer text shadows must be painted at a stack level between the element’s border/background (if present) and the elements text and text decoration. Inner text shadows must be painted over the text and its decorations. UAs should avoid painting text shadows over text in adjacent elements belonging to the same stack level and stacking context. (This may mean that the exact stack level of the shadows depends on whether the element has a border or background: the exact stacking behavior of text shadows is thus UA-defined.)
~strokeとの積層~関係性はどうなる? `7251$issue ◎ Stacking relationship to stroke? [Issue #7251]
`box-shadow$p と同様に、 ~text影は ⇒# ~layoutに波及しない/ ~scroll~~処理を誘発しない/ `~scroll可能な~overflow区画$の~sizeを増やさない。 ◎ Like box-shadow, text shadows do not influence layout, and do not trigger scrolling or increase the size of the scrollable overflow region.
`text-shadow^p ~propは、[ `first-line$pe / `first-letter$pe ]疑似要素にも適用される。 ◎ The text-shadow property applies to both the ::first-line and ::first-letter pseudo-elements.
5. ~text装飾の塗ng
5.1. ~text装飾の塗ng順序
~text装飾は、 `CSS2$r と同じく, それが装飾する~textの直上または直下にある層に次の順序で描かれる (最初が最下~層): ◎ As in [CSS2], text decorations are drawn immediately over/under the text they decorate, in the following order (bottommost first):
- 影( `text-shadow$p ) ◎ shadows (text-shadow)
- 下線( `text-decoration$p ) ◎ underlines (text-decoration)
- 上線( `text-decoration$p ) ◎ overlines (text-decoration)
- ~text ◎ text
- 圏点( `text-emphasis$p ) ◎ emphasis marks (text-emphasis)
- 打消線( `text-decoration$p ) ◎ line-through (text-decoration)
ここで、 `装飾線$が[ ~box装飾/`不可分な行内$ ]をまたぐように描かれる所では、 `有位置$でない内容の上, かつ有位置な子孫( CSS2.1 Appendix E の層 #8 )の直下にある層に描かれる。 ◎ Where line decorations are drawn across box decorations or atomic inlines, they are drawn over non-positioned content and just below any positioned descendants (immediately below layer #8 in CSS2.1 Appendix E).
5.2. ~text装飾の~overflow
`~box$の外側にはみ出た~text装飾は、 `~ink~overflow$と見なされ,`~scroll可能な~overflow区画$を拡張しない。 `css-overflow-3$r ◎ Text decorations that leak outside a box are considered ink overflow: they do not extend the scrollable overflow region. [css-overflow-3]
謝辞
この仕様は、 次の方々からの助力がなければアリでなかった:
This specification would not have been possible without the help from: Ayman Aldahleh, Bert Bos, Tantek Çelik, Stephen Deach, John Daggett, Martin Dürst, Laurie Anna Edlund, Ben Errez, Yaniv Feinberg, Arye Gittelman, Ian Hickson, Martin Heijdra, Richard Ishida, Masayasu Ishikawa, Michael Jochimsen, Eric LeVine, Ambrose Li, Håkon Wium Lie, Chris Lilley, Ken Lunde, Nat McCully, Shinyu Murakami, Paul Nelson, Chris Pratley, Marcin Sawicki, Arnold Schrijver, Rahul Sonnad, Michel Suignard, Takao Suzuki, Frank Tang, Chris Thrasher, Etan Wexler, Chris Wilson, Masafumi Yabe and Steve Zilles.
既定の~UA~stylesheet
この付録は、 規範的ではなく, ~UA開発者が既定の~stylesheetを実装し易くするためにあるが、 ~UA開発者は,これを無視しても変更してもかまわない。 ◎ This appendix is informative, and is to help UA developers to implement default stylesheet, but UA developers are free to ignore or change.
/* ~HTMLにおける代表的な~style付け ◎ typical styling of HTML */ blink { text-decoration-line: blink; } s, strike, del { text-decoration: line-through; } u, ins, :link, :visited { text-decoration: underline; } abbr[title], acronym[title] { text-decoration: dotted underline; } /* ~text圏点の~ruby~textへの継承を不能化する: 圏点は、 基底~textのみに適用されるべきなので ◎ disable inheritance of text-emphasis marks to ruby text: emphasis marks should only apply to base text */ rt { text-emphasis: none; } /* 各 言語に適切な既定の圏点~位置を設定する ◎ set language-appropriate default emphasis mark position */ :root:lang(zh), [lang|=zh] { text-emphasis-position: under right; } [lang|=ja], [lang|=ko] { text-emphasis-position: over right; } /* 各 言語に適切な既定の下線~位置を設定する ◎ set language-appropriate default underline position */ :root:lang(ja), [lang|=ja], :root:lang(mn), [lang|=mn], :root:lang(ko), [lang|=ko] { text-underline-position: right; } :root:lang(zh), [lang|=zh] { text-underline-position: left; } /* 上で `under^v に代えて `auto^v が(暗黙に)選ばれているのは、 内容~互換性の懸念に因る。 ◎ auto is chosen (implied) above instead of under due to content-compatibility concerns */
~~問題を見つけた, あるいは 追加すべき推奨や訂正があれば、 件名に [css-text-decor] を添えて www-style@w3.org 宛まで送信されたし。 ◎ If you find any issues, recommendations to add, or corrections, please send the information to www-style@w3.org with [css-text-decor] in the subject line.
`text-decoration-line$p に対する `blink^v 値は、 他の既存の~propでは 全部的には再現できないが,作者は 次の~CSSでよく似た効果を得られる: ◎ While text-decoration-line: blink can’t be fully reproduced with other existing properties, authors can achieve a very similar effect with the following CSS:
@keyframes blink {
0% {
visibility: hidden;
animation-timing-function: step-end;
}
25%, 100% {
visibility: visible;
}
}
blink {
animation: blink 1s infinite;
}
変更点
- `2022年 5月 4日 作業草案@~TR/2022/WD-css-text-decor-4-20220504/$ からの有意な変更点 ◎ Changes since the 4 May 2022 Working Draft ◎ Significant changes since the 4 May 2022 Working Draft:
- `text-decoration-skip-self$p を設計し直した。 ( `2885$issue ) ◎ Redesigned text-decoration-skip-self. (Issue 2885)
- `text-decoration-skip-edges^p を `text-decoration-inset$p に置換した。 ( `4557$issue ) ◎ Replaced text-decoration-skip-edges with text-decoration-inset. (Issue 4557)
- `text-decoration-skip-spaces$p 用の`~space体$を[ `~Unicode一般~字種$ `Zs^uc を参照する/ すべての~spaceを飛ばすときに限り,単語~分離子を追加的に含める ]よう定義し直した。 ( `5249$issue ) ◎ Redefined spacers for text-decoration-skip-spaces to reference Unicode General Category Zs and to only additionally include word separators when skipping all spaces. (Issue 5249)
- `text-decoration-line$p 用の値[ `spelling-error$v1, `grammar-error$v1 ]が[ `text-decoration$p の他の`下位prop$ ]および[ 概して`装飾線$の外観にも影響する他の~prop ]により波及されることを許容しないようにした。 ◎ Disallowed grammar-error and spelling-error from being influenced by the other sub-properties of text-decoration, as well any other properties typically affecting the appearance of line decorations.
- 算出d値の欄における誤りを修正した。 ( `10044$issue ) ◎ Fixed errors in Computed Value lines. (Issue 10044)
- 諸々の小さな明確化。 ◎ Miscellaneous minor clarifications.
- `2020年 5 月 6日 作業草案@~TR/2020/WD-css-text-decor-4-20200506/$ からの有意な変更点 ◎ Changes since the 6 May 2020 Working Draft ◎ Significant changes since the 6 May 2020 Working Draft:
- `text-shadow$p に`拡幅~距離$, `inset$v を追加した。 ( `6074$issue, `6971$issue ) ◎ Added spread distance and inset to text-shadow. (Issue 6074, Issue 6971)
- `text-decoration-skip-ink$p が影響する装飾は、 当の要素からxした【!initiated】ものに限られることを明確化した。 ( `2817$issue ) ◎ Clarified that text-decoration-skip-ink affects only decorations initiated by the element. (Issue 2817)
- ~propの適用-対象が~textであることを, “適用対象” 欄に明示的に与えた( `5303$issue ) ◎ Explicitly noted properties applying to text in “Applies to” line. (Issue 5303)
- ~level 3 — `2018年 3月 13日 作業草案@~TR/css-text-decor-3/$ — からの変更点 ◎ Additions Since Level 3 ◎ The following features have been added since Level 3:
-
次に挙げる特能を追加した:
- `text-decoration-line$p 用の値[ `spelling-error$v1, `grammar-error$v1 ] ◎ Added spelling-error and grammar-error values to text-decoration-line.
- `text-decoration-thickness$p, `text-underline-offset$p ~prop ◎ Added text-decoration-thickness and text-underline-offset properties.
- `text-underline-position$p 用の値 `from-font$v1 ◎ Added from-font value to text-underline-position.
- `text-decoration-skip$p ~prop, その下位prop ◎ Drafted text-decoration-skip property and its longhands.
- `text-emphasis-skip$p ~prop ◎ Drafted text-emphasis-skip property.
- `text-shadow$p 用の値 `拡幅~距離$, `inset$v ◎ Added spread distance and inset to text-shadow.
~privacyの考慮点
この仕様に対し報告された,新たな~privacyの考慮点は、 無い。 ◎ No new privacy considerations have been reported on this specification.
~securityの考慮点
この仕様に対し報告された,新たな~securityの考慮点は、 無い。 ◎ No new security considerations have been reported on this specification.