Skip to content

Commit 1072cc7

Browse files
[css-values-5] Add no-clamp keyword to progress(). w3c/csswg-drafts@a44eb8c
1 parent 32184f9 commit 1072cc7

1 file changed

Lines changed: 78 additions & 37 deletions

File tree

css-values5-ja.html

Lines changed: 78 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136

137137
spec_title:CSS Values and Units Module Level 5
138138
spec_date:2026-06-12
139-
trans_update:2026-06-12
139+
trans_update:2026-06-14
140140
source_checked:260428
141141
page_state_key:CSS
142142
original_url:https://drafts.csswg.org/css-values-5/
@@ -392,6 +392,8 @@
392392
遡って伝搬する:percolates back up
393393
処する:dealする:~
394394
切詰める:clampする:切り詰める
395+
切詰めら:clampさ:切り詰めら
396+
`max^op( `min^op:clamp
395397
修繕:fixup:~
396398
修繕-:fix up:~
397399
分配-:distribute:~
@@ -1185,6 +1187,8 @@
11851187
v.raw-string:#_valdef-attr-type-raw-string
11861188
v.number:#_valdef-attr-type-number
11871189

1190+
v.no-clamp:#valdef-progress-no-clamp
1191+
11881192
vP.top:#valdef-position-top
11891193
vP.right:#valdef-position-right
11901194
vP.bottom:#valdef-position-bottom
@@ -3252,8 +3256,45 @@ <h2 title="Interpolation Progress Calculations: the progress() notation">5. 補
32523256
`~math関数$であり,他の計算式
32533257
— `~math関数$や`混合-記法$など —
32543258
の中への入力を成し得る。
3259+
その構文は:
32553260
3256-
The progress() functional notation represents the proportional distance of a given value (the progress value) from one value (the progress start value) to another value (the progress end value), each represented as a calculation. It is a math function, and can be input into other calculations such as a math function or a mix notation.
3261+
The progress() functional notation represents the proportional distance of a given value (the progress value) from one value (the progress start value) to another value (the progress end value), each represented as a calculation. It is a math function, and can be input into other calculations such as a math function or a mix notation. The syntax of progress() is:
3262+
</p>
3263+
3264+
<pre class="prod">
3265+
`progress()$t
3266+
= progress(`no-clamp$v? `calc-sum$t, `calc-sum$t, `calc-sum$t)
3267+
</pre>
3268+
3269+
<p>
3270+
引数たちを成す各 `calc-sum$t は、
3271+
順に[
3272+
`進捗~値$,
3273+
`進捗~始端~値$,
3274+
`進捗~終端~値$
3275+
]を表現する。
3276+
3277+
where the first, second, and third &lt;calc-sum&gt; values represent the progress value, progress start value, and progress end value, respectively.
3278+
</p>
3279+
3280+
<p>
3281+
`no-clamp@v
3282+
が指定された場合、
3283+
`progress$f 関数は,どの実数にも解決され得る【無限大も含む】。
3284+
省略された場合(既定)、
3285+
返り値は,
3286+
範囲 0 以上 1 以下に切詰められる。
3287+
3288+
If no-clamp is present, the progress() function can potentially resolve to any number; if omitted (the default), the return value is clamped to the range [0, 1].
3289+
</p>
3290+
3291+
<p>
3292+
これらの`計算式$たち %計算式たち を成す各~計算式は[
3293+
`number$t, `dimension$t, `percentage$t
3294+
]いずれにも解決され得るが、
3295+
%計算式たち が`一貫した型を有して$いない場合,当の関数は無効になる。
3296+
3297+
The argument calculations can resolve to any &lt;number&gt;, &lt;dimension&gt;, or &lt;percentage&gt;, but must have a consistent type or else the function is invalid.
32573298
</p>
32583299

32593300
<div>
@@ -3286,14 +3327,45 @@ <h2 title="Interpolation Progress Calculations: the progress() notation">5. 補
32863327
</p>
32873328
<ol>
32883329
<li>
3330+
%切詰めるか ~LET ~IS[
3331+
当の関数に `no-clamp$v は指定されていない
3332+
3333+
3334+
</li>
3335+
<li>
3336+
<p>
32893337
~IF[
32903338
%始端~値 ~NEQ %終端~値
3339+
]:
3340+
</p>
3341+
<ol>
3342+
<li>
3343+
%結果 ~LET ( %値 ~MINUS %始端~値 ) ~DIV ( %終端~値 ~MINUS %始端~値 )
3344+
</li>
3345+
<li>
3346+
~IF[
3347+
%切詰めるか ~EQ ~T
32913348
32923349
3293-
~RET ( %値 ~MINUS %始端~値 ) ~DIV ( %終端~値 ~MINUS %始端~値 )
3350+
%結果 ~SET `max^op( `min^op( %結果, 1 ), 0 )
3351+
</li>
3352+
<li>
3353+
~RET %結果
3354+
</li>
3355+
</ol>
32943356
32953357
If the progress start value and progress end value are different values
3296-
• (progress value - progress start value) / (progress end value - progress start value).
3358+
• (progress value - progress start value) / (progress end value - progress start value), clamped to the [0,1] range if no-clamp is not specified.
3359+
</li>
3360+
<li>
3361+
~IF[
3362+
%切詰めるか ~EQ ~T
3363+
3364+
3365+
~RET 0
3366+
3367+
If the progress start value and progress end value are the same value
3368+
• 0 if no-clamp is not specified.
32973369
</li>
32983370
<li>
32993371
~RET %値 に応じて
@@ -3302,43 +3374,11 @@ <h2 title="Interpolation Progress Calculations: the progress() notation">5. 補
33023374
%値 ~GT %始端~値 ならば +∞ /
33033375
%値 ~EQ %始端~値 ならば 0
33043376
3305-
If the progress start value and progress end value are the same value
3306-
• 0, -∞, or +∞, depending on whether progress value is equal to, less than, or greater than the shared value.
3377+
• Otherwise, 0, -∞, or +∞, depending on whether progress value is equal to, less than, or greater than the shared value.
33073378
</li>
33083379
</ol>
33093380
</div>
33103381

3311-
<p>
3312-
`progress$f の構文は:
3313-
3314-
The syntax of progress() is defined as follows:
3315-
</p>
3316-
3317-
<pre class="prod">
3318-
`progress()$t
3319-
= progress(`calc-sum$t, `calc-sum$t, `calc-sum$t)
3320-
</pre>
3321-
3322-
<p>
3323-
各 `calc-sum$t 値は、
3324-
順に[
3325-
`進捗~値$,
3326-
`進捗~始端~値$,
3327-
`進捗~終端~値$
3328-
]を表現する。
3329-
3330-
where the first, second, and third &lt;calc-sum&gt; values represent the progress value, progress start value, and progress end value, respectively.
3331-
</p>
3332-
3333-
<p>
3334-
これらの`計算式$たち %計算式たち を成す各~計算式は[
3335-
`number$t, `dimension$t, `percentage$t
3336-
]いずれにも解決され得るが、
3337-
%計算式たち が`一貫した型を有して$いない場合,当の関数は無効になる。
3338-
3339-
The argument calculations can resolve to any &lt;number&gt;, &lt;dimension&gt;, or &lt;percentage&gt;, but must have a consistent type or else the function is invalid.
3340-
</p>
3341-
33423382
<p class="issue">
33433383
`percent-progress^f 記法は必要か?
33443384
あるいは、
@@ -3351,6 +3391,7 @@ <h2 title="Interpolation Progress Calculations: the progress() notation">5. 補
33513391
`progress$f 関数は、
33523392
0 以上 100% 以下に切詰めるべきか?
33533393
[`11825$issue]
3394+
【 `no-clamp$v が導入されたので、今や不要な段落。】
33543395
33553396
Should progress() functions clamp to 0-100%? [Issue #11825]
33563397
</p>

0 commit comments

Comments
 (0)