From a8026efcd3bbf9ac82b6dc432fb5b5ea08af3126 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 8 Oct 2021 01:42:14 +0900 Subject: CSS テキスト装飾の各プロパティの文書を更新 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2021/10/04 時点の英語版に同期 --- .../ja/web/css/text-decoration-thickness/index.md | 104 +++++++++------------ 1 file changed, 45 insertions(+), 59 deletions(-) (limited to 'files/ja/web/css/text-decoration-thickness/index.md') diff --git a/files/ja/web/css/text-decoration-thickness/index.md b/files/ja/web/css/text-decoration-thickness/index.md index 63fcce1a71..b2d8586caf 100644 --- a/files/ja/web/css/text-decoration-thickness/index.md +++ b/files/ja/web/css/text-decoration-thickness/index.md @@ -3,21 +3,23 @@ title: text-decoration-thickness slug: Web/CSS/text-decoration-thickness tags: - CSS - - CSS Text Decoration - - Property + - CSS テキスト装飾 + - プロパティ - Reference - - 'recipe:css-property' + - recipe:css-property - text-decoration - text-decoration-thickness +browser-compat: css.properties.text-decoration-thickness translation_of: Web/CSS/text-decoration-thickness --- -
{{CSSRef}}
+{{CSSRef}} -

text-decoration-thicknessCSS のプロパティで、要素内のテキストに用いられる装飾線、例えば取り消し線、下線、上線の太さを設定します。

+**`text-decoration-thickness`** は [CSS](/ja/docs/Web/CSS) のプロパティで、要素内のテキストに用いられる装飾線、例えば取り消し線、下線、上線の太さを設定します。 -

構文

+## 構文 -
/* 単独のキーワード */
+```css
+/* 単独のキーワード */
 text-decoration-thickness: auto;
 text-decoration-thickness: from-font;
 
@@ -31,43 +33,45 @@ text-decoration-thickness: 10%;
 /* グローバル値 */
 text-decoration-thickness: inherit;
 text-decoration-thickness: initial;
+text-decoration-thickness: revert;
 text-decoration-thickness: unset;
-
+``` -

+### 値 -
-
auto
-
ブラウザーがテキスト装飾線の適切な太さを選択します。
-
from-font
-
フォントファイルに推奨する太さの情報が含まれている場合は、その値を使用します。フォントファイルにこの情報が含まれていない場合は、 auto が設定されているのと同様に動作し、ブラウザーが適切な太さを選択します。
-
<length>
-
テキスト装飾線の太さを {{cssxref('length')}} として指定し、フォントファイルの推奨値やブラウザーの既定値を無視します。
-
<percentage>
-
テキスト装飾線の太さを現在のフォントの 1em に対する {{cssxref('percentage')}} で指定します。パーセント値は相対値として継承されるので、フォントが変わるとそれに合わせて変わります。ブラウザーは最小でも 1 デバイスピクセルを使用しなければなりません。このプロパティを適用した場合、フォントの大きさが異なる子要素があっても、適用されたボックス全体で太さが一定になります。
-
+- `auto` + - : ブラウザーがテキスト装飾線の適切な太さを選択します。 +- `from-font` + - : フォントファイルに推奨する太さの情報が含まれている場合は、その値を使用します。フォントファイルにこの情報が含まれていない場合は、 `auto` が設定されているのと同様に動作し、ブラウザーが適切な太さを選択します。 +- `` + - : テキスト装飾線の太さを {{cssxref('length')}} として指定し、フォントファイルの推奨値やブラウザーの既定値を無視します。 +- `` + - : テキスト装飾線の太さを現在のフォントの **1em** に対する {{cssxref('percentage')}} で指定します。パーセント値は相対値として継承されるので、フォントが変わるとそれに合わせて変わります。ブラウザーは最小でも 1 デバイスピクセルを使用しなければなりません。このプロパティを適用した場合、フォントの大きさが異なる子要素があっても、適用されたボックス全体で太さが一定になります。 -

公式定義

+## 公式定義 -

{{CSSInfo}}

+{{CSSInfo}} -

形式文法

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

+## Examples

様々な太さ

-

HTML

+#### HTML -
<p class="thin">赤い 1px の下線を引いたテキストです。</p>
-<p class="thick">赤い 5px の下線を引いたテキストです。</p>
-<p class="shorthand">これは同等の一括指定を使用しています。</p>
+```html +

赤い 1px の下線を引いたテキストです。

+

赤い 5px の下線を引いたテキストです。

+

これは同等の一括指定を使用しています。

+``` -

CSS

+#### CSS -
.thin {
+```css
+.thin {
   text-decoration-line: underline;
   text-decoration-style: solid;
   text-decoration-color: red;
@@ -83,42 +87,24 @@ text-decoration-thickness: unset;
 
 .shorthand {
   text-decoration: underline solid red 5px;
-}
+} +``` -

結果

+#### Results -

{{ EmbedLiveSample('Varying_thickness', '', '', '') }}

+{{ EmbedLiveSample('Varying_thickness', '', '', '') }} -

仕様書

+## 仕様書 - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS4 Text Decoration', '#text-decoration-width-property', 'text-decoration-width')}}{{Spec2('CSS4 Text Decoration')}}初回定義
+{{Specifications}} -
-

: このプロパティは text-decoration-width と呼ばれていましたが、 2019 年に text-decoration-thickness に更新されました。

-
+> **Note:** このプロパティは `text-decoration-width` と呼ばれていましたが、 2019 年に `text-decoration-thickness` に更新されました。 -

ブラウザーの互換性

+## ブラウザーの互換性 -

{{Compat("css.properties.text-decoration-thickness")}}

+{{Compat}} -

関連情報

+## 関連情報 -
    -
  • {{cssxref("text-decoration")}}
  • -
  • {{cssxref("text-underline-offset")}}
  • -
+- {{cssxref("text-decoration")}} +- {{cssxref("text-underline-offset")}} -- cgit v1.2.3-54-g00ecf