text-decoration-skip
は CSS のプロパティで、要素に影響する要素の内容に対するテキスト装飾のどの部分をスキップする必要があるかを設定します。これは要素によって描かれたテキスト装飾の行、および祖先によって描かれたすべてのテキスト装飾を制御します。
メモ: 他の多くのブラウザーでは、より単純な text-decoration-skip-ink
プロパティへの対応に集中しています。
/* キーワード値 */
text-decoration-skip: none;
text-decoration-skip: objects;
text-decoration-skip: spaces;
text-decoration-skip: edges;
text-decoration-skip: box-decoration;
/* 複数のキーワード */
text-decoration-skip: objects spaces;
text-decoration-skip: leading-spaces trailing-spaces;
text-decoration-skip: objects edges box-decoration;
/* グローバル値 */
text-decoration-skip: inherit;
text-decoration-skip: initial;
text-decoration-skip: unset;
初期値 | objects |
---|---|
適用対象 | すべての要素 |
継承 | あり |
計算値 | 指定通り |
アニメーションの種類 | 離散値 |
構文
値
none
- 何もスキップされません。つまり、テキストの装飾はすべてのテキストの内容と不可分のインラインレベルボックスに渡って描かれます。
objects
- 要素の中で、画像やインラインブロックなどの不可分のインラインボックスのマージンボックス全体がスキップされます。
spaces
- すべての空白をスキップします。すべての Unicode ホワイトスペース文字、すべての単語区切りに加えて、子孫の
letter-spacing
またはword-spacing
すべてです。 leading-spaces
- 先頭の空白のみがスキップされるという点を除いて、
spaces
と同じです。 trailing-spaces
- 末尾の空白のみがスキップされるという点を除いて、
spaces
と同じです。 edges
- テキスト装飾の始点と終点を、装飾ボックスのコンテンツの辺からわずかに (例えば線の太さの半分だけ) 離します。つまり、子孫ボックスには個別に下線が引かれます。 (これは中国語で、区切って下線を引くのに重要です。)
box-decoration
- テキストの装飾はボックスのマージン、境界、パディング領域をスキップします。これは祖先により重ねられた装飾の効果のみを持ちます。装飾ボックスはボックスの装飾の上に描画を行いません。
形式文法
例
HTML
<p>Hey, grab a cup of <em>coffee!</em></p>
CSS
p {
margin: 0;
font-size: 3em;
text-decoration: underline;
text-decoration-skip: edges;
}
結果
仕様書
仕様書 | 状態 | 備考 |
---|---|---|
CSS Text Decoration Module Level 4 text-decoration-skip の定義 |
草案 | 初回定義 |
ブラウザーの互換性
BCD tables only load in the browser