Skip to content

Commit 4de438e

Browse files
[css-values-4] Define generic serialization for functional notations. w3c/csswg-drafts@05c815d
1 parent dc59659 commit 4de438e

1 file changed

Lines changed: 172 additions & 3 deletions

File tree

css-values-ja.html

Lines changed: 172 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@
128128
case 'U':
129129
text = `U+${key}`
130130
break;
131+
case 'smb':
132+
text = `(<span class="char-symbol">${text}</span>)`;
133+
break;
131134
case 'en':
132135
return `<span lang="en">${key}</span>`
133136
break;
@@ -173,8 +176,8 @@
173176
●●options
174177

175178
spec_title:CSS Values and Units Module Level 4
176-
spec_date:2026-05-12
177-
trans_update:2026-05-22
179+
spec_date:2026-06-24
180+
trans_update:2026-06-25
178181
source_checked:250605
179182
page_state_key:CSS
180183
original_url:https://drafts.csswg.org/css-values-4/
@@ -625,6 +628,10 @@
625628
わたり:stretch across
626629
裸の:naked
627630
文法~上の:grammatical
631+
記され:written
632+
挟む:join
633+
挟む:-
634+
~semicolon:semi-colon
628635

629636
●layout / typeset
630637
size:width and height/:widths and heights
@@ -709,6 +716,9 @@
709716
書字:writing::~
710717
下位prop:longhand
711718
~channel:color-channel
719+
宣言d:declared::宣言
720+
色停:color-stop::~
721+
色停:stop
712722

713723
●UI
714724
展開-:expand:~
@@ -1094,6 +1104,7 @@
10941104
同じ結果:identical to
10951105
不揃い:varying
10961106
他と合致しない:mismatched
1107+
から導出されるもの:derivative
10971108

10981109
●未分類
10991110
覆う:coverする:~
@@ -1242,6 +1253,7 @@
12421253
上の〜:preceding
12431254
-:at-least
12441255
-:distinct
1256+
最後:final
12451257
最後に:finally
12461258
多い:many times
12471259
これまでの:earlier
@@ -1682,6 +1694,7 @@
16821694

16831695
~定義の構文:#css-value-definition-syntax
16841696
関数-記法:#functional-notation
1697+
関数-記法を直列化する:#serialize-a-functional-notation
16851698
複化子:#component-multipliers
16861699
結合子:#component-combinators
16871700
~textな~data型:#css-textual-data-types
@@ -1811,9 +1824,10 @@
18111824
~escape:~CSSSYN#escaping
18121825
~escape:~CSS22/syndata.html#escaped-characters
18131826

1827+
宣言d値:~CASCADE#declared-value
1828+
指定d値:~CASCADE#specified-value
18141829
算出d値:~CASCADE#computed-value
18151830
使用~:~CASCADE#used-value
1816-
指定d値:~CASCADE#specified-value
18171831
実際の値:~CASCADE#actual-value
18181832
初期~:~CASCADE#initial-value
18191833
解決d値:~CSSOM1#resolved-values
@@ -1872,6 +1886,8 @@
18721886

18731887
既定の~anchor要素:~CSSANCHOR#default-anchor-element
18741888

1889+
色停:~CSSIMAGE#color-stop
1890+
18751891
●外部(他
18761892

18771893
実装定義:~INFRA#implementation-defined
@@ -1883,6 +1899,8 @@
18831899
~size:~INFRA#list-size
18841900
付加する:~INFRA#list-append
18851901
空にする:~INFRA#list-empty
1902+
連結する:~INFRA#string-concatenate
1903+
~ASCII小文字~化する:~INFRA#ascii-lowercase
18861904

18871905
過去互換~mode:~DOM4#concept-document-quirks
18881906
~node~tree:~DOM4#concept-node-tree
@@ -7369,6 +7387,157 @@ <h2 title="Functional Notations">9. 関数-記法</h2>
73697387
The math functions are defined below. Other functional notations are defined in their own modules; for example the &lt;color&gt; functions are defined in [CSS-COLOR-4] and [CSS-COLOR-5].
73707388
</p>
73717389

7390+
<section id="fuctional-serialization">
7391+
<h3 title="Serialization of Functional Notations">9.1. 関数-記法の直列化</h3>
7392+
7393+
<p>
7394+
`関数-記法$の直列化は、
7395+
他が指定されない限り,
7396+
`関数-記法を直列化する$ ~algoに従う。
7397+
7398+
Unless otherwise specified,\
7399+
</p>
7400+
7401+
<div class="algo">
7402+
<p>
7403+
`関数-記法を直列化する@
7404+
~algoは、
7405+
所与の
7406+
( `関数-記法$ %関数 )
7407+
に対し
7408+
7409+
~RET 次を順に`連結する$
7410+
⇒#
7411+
`~ASCII小文字~化する$( %関数 の名前 ),
7412+
`0028^U `(^smb,
7413+
%関数 を成す引数たちを以下に従って直列化した結果,
7414+
`0029^U `)^smb
7415+
</p>
7416+
7417+
<p>
7418+
引数たちを直列化する際には:
7419+
</p>
7420+
<ul>
7421+
<li>
7422+
7423+
%関数 を成す各~引数を個々の文法に従って直列化した結果
7424+
]を %関数 の文法に記された順序で`連結する$。
7425+
</li>
7426+
<li>
7427+
~spaceで分離される~tokenたちは 1 個の~space( `0020^U `SPACE^cn )で`連結する$。
7428+
</li>
7429+
<li>
7430+
直列化した結果を成す各[
7431+
~comma, ~colon, ~semicolon, ~slash
7432+
]の直後には 1 個の~space( `0020^U `SPACE^cn )を挟む。
7433+
</li>
7434+
<li>
7435+
`算出d値$や算出d値から導出されるもの(`指定d値$や`宣言d値$でないもの)を直列化する際には、
7436+
省略しても意味が変化しない成分を省略する。
7437+
</li>
7438+
</ul>
7439+
7440+
to serialize a functional notation:
7441+
• Let s be a string containing the function’s name in lowercase, followed by “(” (U+0028 LEFT PARENTHESIS).
7442+
• Append to s the serializations of the arguments of the functional notation per their individual grammars,\
7443+
in the order the grammars are written in,\
7444+
joining space-separated tokens with a single space,\
7445+
and following each serialized comma, colon, semi-colon, or slash with a single space (U+0020 SPACE).\
7446+
When serializing the computed value or its derivatives (not specified or declared values), omit components when possible without changing the meaning.
7447+
• Append “)” (`0029^U RIGHT PARENTHESIS) to s.
7448+
</div>
7449+
7450+
<p class="issue">
7451+
`指定d値$がどう取扱われるかにおいて一貫でない。
7452+
`9720$issue
7453+
7454+
We are inconsistent in how we handled specified values. [Issue #9720]
7455+
</p>
7456+
7457+
<div class="example">
7458+
<p>
7459+
`LINEAR-GRADIENT( to bottom , red calc( 1em + 5% ) , green calc(130px / 2) , blue 100% )^v
7460+
の様な関数を直列化した結果は:
7461+
7462+
For example, given a function like LINEAR-GRADIENT( to bottom , red calc( 1em + 5% ) , green calc(130px / 2) , blue 100% ):
7463+
</p>
7464+
<ul>
7465+
<li>
7466+
<p>
7467+
`指定d値$としては
7468+
7469+
`linear-gradient(to bottom, red calc(5% + 1em), green calc(65px), blue 100%)^l
7470+
7471+
as a specified value
7472+
• it will serialize as linear-gradient(to bottom, red calc(5% + 1em), green calc(65px), blue 100%)
7473+
</p>
7474+
7475+
<p>
7476+
その際には:
7477+
7478+
</p>
7479+
<ul>
7480+
<li>
7481+
関数~名や`~keyword$は小文字~化される。
7482+
7483+
• Function names and keywords become lowercase.
7484+
</li>
7485+
<li>
7486+
~tokenどうしの合間における空白~列は 1 個の~spaceに正規化されるが、
7487+
次に挙げる箇所には~spaceを挟まない
7488+
⇒#
7489+
左~丸括弧や左~角括弧の直後/
7490+
右~丸括弧や右~角括弧の直前/
7491+
~commaの直前
7492+
7493+
• Whitespace is normalized: one space between most tokens, but no space after left parentheses/brackets, before right parentheses/brackets, or before commas
7494+
</li>
7495+
<li>
7496+
各 `calc$f 引数は、
7497+
`§ 直列化@#calc-serialize$ に従って,単純~化され, ~sortされる。
7498+
7499+
• calc() arguments are simplified and sorted per § 10.13 Serialization
7500+
</li>
7501+
</ul>
7502+
</li>
7503+
<li>
7504+
<p>
7505+
`算出d値$としては
7506+
7507+
`linear-gradient(red calc(5% + 16px), green calc(65px), blue)^l
7508+
7509+
as a computed value
7510+
• it will serialize as linear-gradient(red calc(5% + 16px), green calc(65px), blue)
7511+
</p>
7512+
7513+
<p>
7514+
その際には、
7515+
`指定d値$に適用される単純~化【や小文字~化その他】に加えて:
7516+
7517+
• In addition to any specified value simplifications,\
7518+
</p>
7519+
<ul>
7520+
<li>
7521+
追加的な値の算出
7522+
— `指定d長さ$を`算出d長さ$へ変換するなど —
7523+
があれば,それも適用される。
7524+
7525+
• any additional value computations are also applied, such as converting specified lengths to computed lengths.
7526+
</li>
7527+
<li>
7528+
省略-時の既定に合致する値は、
7529+
まるごと省略される
7530+
(この例においては、
7531+
`to bottom^v や最後の`色停$を成す位置 `100%^v )。
7532+
7533+
• Values that match the default (e.g. to bottom, the 100% stop position on the final stop) are omitted entirely.
7534+
</li>
7535+
</ul>
7536+
</li>
7537+
</ul>
7538+
</div>
7539+
7540+
</section>
73727541
</section>
73737542
<section id="math">
73747543
<h2 title="Mathematical Expressions">10. 数学的な式</h2>

0 commit comments

Comments
 (0)