From e160f04ecb5945c3dcf028e9d836be665dbf0ddc Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 20 Nov 2021 23:56:35 +0900 Subject: CSS Values and Units のプロパティを変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/string/index.html | 97 -------------------------------------- files/ja/web/css/string/index.md | 97 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 files/ja/web/css/string/index.html create mode 100644 files/ja/web/css/string/index.md (limited to 'files/ja/web/css/string') diff --git a/files/ja/web/css/string/index.html b/files/ja/web/css/string/index.html deleted file mode 100644 index 80290bbea9..0000000000 --- a/files/ja/web/css/string/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: -slug: Web/CSS/string -tags: - - CSS - - CSS データ型 - - CSS Data Type - - Data Type - - Layout - - Reference - - Web - - ウェブ - - レイアウト -translation_of: Web/CSS/string ---- -
{{CSSRef}}
- -

<string>CSSデータ型で、一連の文字列を表します。文字列は {{CSSxRef("content")}}, {{CSSxRef("font-family")}}, {{CSSxRef("quotes")}} など、数々の CSS プロパティで使用されます。

- -

構文

- -

<string> データ型は任意の数の Unicode 文字を、二重引用符 (") または単一引用符 (') で囲んで構成します。

- -

多くの文字は文字通りに表現されます。またすべての文字は、それぞれの 16 進数の Unicode コードポイントで表現することもできます。例えば、 \22 は二重引用符を表し、 \27 は単一引用符 (')、 \A9 は著作権記号 (©) を表します。

- -

重要なことは、文字によっては他の方法として、バックスラッシュでエスケープすることもできます。これらには二重引用符で囲まれた文字列内で使われる二重引用符、単一引用符で囲まれた文字列内で使われる単一引用符、およびバックスラッシュ自身です。例えば、 \\ は単一のバックスラッシュを生成します。

- -

改行文字を出力するには、 \A 又は \00000A のように改行文字としてエスケープする必要があります。しかし、改行を行の末尾の文字として \ でエスケープすると、コード内で文字列を複数行に渡らせることができます。

- -
-

注: HTML エンティティ (&nbsp;&#8212; など) は、 CSS の <string> の中で使用することはできません。

-
- -

- -

有効な文字列の例

- -
/* 単純な文字列 */
-"This string is demarcated by double quotes."
-'This string is demarcated by single quotes.'
-
-/* 文字のエスケープ */
-"This is a string with \" an escaped double quote."
-"This string also has \22 an escaped double quote."
-'This is a string with \' an escaped single quote.'
-'This string also has \27 an escaped single quote.'
-"This is a string with \\ an escaped backslash."
-
-/* 文字列内の改行 */
-"This string has a \Aline break in it."
-
-/* 2 行にわたる文字列 (これら 2 つの文字列は同じ出力になります) */
-"A really long \
-awesome string"
-"A really long awesome string"
-
- -

仕様書

- - - - - - - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS3 Values', '#strings', '<string>')}}{{Spec2('CSS3 Values')}}CSS Level 2 (Revision 1) から重要な変更なし
{{SpecName('CSS2.1', 'syndata.html#strings', '<string>')}}{{Spec2('CSS2.1')}}明示的定義; Unicode の 6 桁エスケープ文字を許容
{{SpecName('CSS1', '', '<string>')}}{{Spec2('CSS1')}}暗黙的定義; Unicode の 4 桁エスケープ文字を許容
- -

ブラウザーの互換性

- -

{{Compat("css.types.string")}}

- -

関連情報

- - diff --git a/files/ja/web/css/string/index.md b/files/ja/web/css/string/index.md new file mode 100644 index 0000000000..80290bbea9 --- /dev/null +++ b/files/ja/web/css/string/index.md @@ -0,0 +1,97 @@ +--- +title: +slug: Web/CSS/string +tags: + - CSS + - CSS データ型 + - CSS Data Type + - Data Type + - Layout + - Reference + - Web + - ウェブ + - レイアウト +translation_of: Web/CSS/string +--- +
{{CSSRef}}
+ +

<string>CSSデータ型で、一連の文字列を表します。文字列は {{CSSxRef("content")}}, {{CSSxRef("font-family")}}, {{CSSxRef("quotes")}} など、数々の CSS プロパティで使用されます。

+ +

構文

+ +

<string> データ型は任意の数の Unicode 文字を、二重引用符 (") または単一引用符 (') で囲んで構成します。

+ +

多くの文字は文字通りに表現されます。またすべての文字は、それぞれの 16 進数の Unicode コードポイントで表現することもできます。例えば、 \22 は二重引用符を表し、 \27 は単一引用符 (')、 \A9 は著作権記号 (©) を表します。

+ +

重要なことは、文字によっては他の方法として、バックスラッシュでエスケープすることもできます。これらには二重引用符で囲まれた文字列内で使われる二重引用符、単一引用符で囲まれた文字列内で使われる単一引用符、およびバックスラッシュ自身です。例えば、 \\ は単一のバックスラッシュを生成します。

+ +

改行文字を出力するには、 \A 又は \00000A のように改行文字としてエスケープする必要があります。しかし、改行を行の末尾の文字として \ でエスケープすると、コード内で文字列を複数行に渡らせることができます。

+ +
+

注: HTML エンティティ (&nbsp;&#8212; など) は、 CSS の <string> の中で使用することはできません。

+
+ +

+ +

有効な文字列の例

+ +
/* 単純な文字列 */
+"This string is demarcated by double quotes."
+'This string is demarcated by single quotes.'
+
+/* 文字のエスケープ */
+"This is a string with \" an escaped double quote."
+"This string also has \22 an escaped double quote."
+'This is a string with \' an escaped single quote.'
+'This string also has \27 an escaped single quote.'
+"This is a string with \\ an escaped backslash."
+
+/* 文字列内の改行 */
+"This string has a \Aline break in it."
+
+/* 2 行にわたる文字列 (これら 2 つの文字列は同じ出力になります) */
+"A really long \
+awesome string"
+"A really long awesome string"
+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Values', '#strings', '<string>')}}{{Spec2('CSS3 Values')}}CSS Level 2 (Revision 1) から重要な変更なし
{{SpecName('CSS2.1', 'syndata.html#strings', '<string>')}}{{Spec2('CSS2.1')}}明示的定義; Unicode の 6 桁エスケープ文字を許容
{{SpecName('CSS1', '', '<string>')}}{{Spec2('CSS1')}}暗黙的定義; Unicode の 4 桁エスケープ文字を許容
+ +

ブラウザーの互換性

+ +

{{Compat("css.types.string")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf