From 0dd9c746a2fb58f5ffa8eda3ac5484e177a80891 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Mon, 4 Oct 2021 10:56:00 +0900 Subject: Web/CSS/text-underline-offset を更新 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2021/08/13 時点の英語版に同期 --- files/ja/web/css/text-underline-offset/index.md | 109 +++++++++++------------- 1 file changed, 51 insertions(+), 58 deletions(-) (limited to 'files/ja/web/css') diff --git a/files/ja/web/css/text-underline-offset/index.md b/files/ja/web/css/text-underline-offset/index.md index fd95b1560c..5b26c324d9 100644 --- a/files/ja/web/css/text-underline-offset/index.md +++ b/files/ja/web/css/text-underline-offset/index.md @@ -4,23 +4,24 @@ slug: Web/CSS/text-underline-offset tags: - CSS - CSS Text Decoration - - CSS テキスト装飾 - - Property + - プロパティ - Reference + - recipe:css-property - text-decoration - text-underline-offset - - プロパティ +browser-compat: css.properties.text-underline-offset translation_of: Web/CSS/text-underline-offset --- -
{{CSSRef}}
+{{CSSRef}} -

text-underline-offsetCSS のプロパティで、 ({{cssxref("text-decoration")}} を使用して適用された) 下線のテキスト装飾線の本来の位置からのオフセット距離を設定します。

+**`text-underline-offset`** は [CSS](/ja/docs/Web/CSS) のプロパティで、 ({{cssxref("text-decoration")}} を使用して適用された) 下線のテキスト装飾線の本来の位置からのオフセット距離を設定します。 -

text-underline-offset は {{cssxref('text-decoration')}} の一括指定の一部ではありません。一つの要素が複数の text-decoration による線を持つため、 text-underline-offset は下線のみに影響し、 overlineline-through などの他の装飾線には影響しません

+`text-underline-offset` は {{cssxref('text-decoration')}} の一括指定の一部ではありません。一つの要素が複数の `text-decoration` による線を持つため、 `text-underline-offset` は下線のみに影響し、 `overline` や `line-through` などの他の装飾線には影響**しません**。 -

構文

+## 構文 -
/* 単一のキーワード */
+```css
+/* 単一のキーワード */
 text-underline-offset: auto;
 
 /* 長さ */
@@ -33,33 +34,41 @@ text-underline-offset: 20%;
 /* グローバル値 */
 text-underline-offset: inherit;
 text-underline-offset: initial;
+text-underline-offset: revert;
 text-underline-offset: unset;
-
+``` + +`text-underline-offset` プロパティは、以下のリストのうち一つの値で指定します。 + +### 値 -

text-underline-offset プロパティは、以下のリストのうち一つの値で指定します。

+- `auto` + - : ブラウザーが下線の適切なオフセットを選択します。 +- `` + - : 下線のオフセットを {{cssxref('length')}} で指定し、フォントファイルの提案やブラウザーの既定値を上書きします。オフセットがフォントサイズに合わせて変化するように、 `em` 単位を使用することを推奨します。 +- `` + - : 下線のオフセットを、要素のフォントにおける **1 em** に対する {{cssxref('percentage')}} で指定します。パーセント値はは相対値として継承されるため、フォントの変化に応じて変化します。このプロパティを適用した場合、オフセットは、フォントサイズや垂直方向の配置が異なる子要素があっても、下線が適用されているボックス全体で一定となります。 -

+## 公式定義 -
-
auto
-
ブラウザーが下線の適切なオフセットを選択します。
-
<length>
-
下線のオフセットを {{cssxref('length')}} で指定し、フォントファイルの提案やブラウザーの既定値を上書きします。オフセットがフォントサイズに合わせて変化するように、 em 単位を使用することを推奨します。
-
<percentage>
-
下線のオフセットを、要素のフォントにおける 1 em に対する {{cssxref('percentage')}} で指定します。パーセント値はは相対値として継承されるため、フォントの変化に応じて変化します。このプロパティを適用した場合、オフセットは、フォントサイズや垂直方向の配置が異なる子要素があっても、下線が適用されているボックス全体で一定となります。
-
+{{CSSInfo}} -

形式文法

+## 形式文法 {{csssyntax}} -

+

-
<p class="oneline">Here's some text with an offset wavy red underline!</p>
-<br>
-<p class="twolines">This text has lines both above and below it. Only the bottom one is offset.</p>
+### text-underline-offset のデモ -
p {
+```html
+

Here's some text with an offset wavy red underline!

+
+

This text has lines both above and below it. Only the bottom one is offset.

+``` + +```css +p { text-decoration: underline wavy red; text-underline-offset: 1em; } @@ -67,36 +76,20 @@ text-underline-offset: unset; .twolines { text-decoration-color: purple; text-decoration-line: underline overline; -}
- -

{{ EmbedLiveSample('Examples', '', '', '') }}

- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS4 Text Decoration', '#underline-offset', 'text-underline-offset')}}{{Spec2('CSS4 Text Decoration')}}初回定義
- -

ブラウザーの互換性

- -

{{Compat("css.properties.text-underline-offset")}}

- -

関連情報

- -
    -
  • {{cssxref("text-decoration")}}
  • -
  • {{cssxref("text-decoration-thickness")}}
  • -
+} +``` + +{{ EmbedLiveSample('Examples', '', '', '') }} + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} + +## 関連情報 + +- {{cssxref("text-decoration")}} +- {{cssxref("text-decoration-thickness")}} -- cgit v1.2.3-54-g00ecf