Skip to content

Commit a6f80db

Browse files
committed
[css-values-4] Renamed <<flex>> to <<fraction>>
1 parent ba127d0 commit a6f80db

File tree

6 files changed

+58
-54
lines changed

6 files changed

+58
-54
lines changed

css-borders-4/Overview.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ The 'border-clip' properties</h3>
322322

323323
<pre class="propdef">
324324
Name: border-clip, border-clip-top, border-clip-right, border-clip-bottom, border-clip-left
325-
Value: normal | [ <<length-percentage [0,&infin;]>> | <<flex>> ]+
325+
Value: normal | [ <<length-percentage [0,&infin;]>> | <<fraction>> ]+
326326
Initial: normal
327327
Inherited: no
328328
Percentages: refer to length of border-edge side

css-grid-1/Overview.bs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
15111511
15121512
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( <<length-percentage [0,∞]>> )
15131513
<dfn>&lt;fixed-size></dfn> = <<fixed-breadth>> | minmax( <<fixed-breadth>> , <<track-breadth>> ) | minmax( <<inflexible-breadth>> , <<fixed-breadth>> )
1514-
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<flex [0,∞]>> | min-content | max-content | auto
1514+
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<fraction [0,∞]>> | min-content | max-content | auto
15151515
<dfn>&lt;inflexible-breadth></dfn> = <<length-percentage [0,∞]>> | min-content | max-content | auto
15161516
<dfn>&lt;fixed-breadth></dfn> = <<length-percentage [0,∞]>>
15171517
<dfn>&lt;line-names></dfn> = '[' <<custom-ident>>* ']'
@@ -1540,10 +1540,10 @@ Track Sizes</h4>
15401540
and then resolve against that resulting <a>grid container</a> size
15411541
for the purpose of laying out the <a>grid</a> and its items.
15421542

1543-
<dt><dfn><<flex [0,∞]>></dfn>
1543+
<dt><dfn><<fraction [0,∞]>></dfn>
15441544
<dd>
15451545
Specifies the track's <dfn dfn noexport>flex factor</dfn>.
1546-
Each <<flex>>-sized track takes a share of the remaining space in proportion to its <a>flex factor</a>.
1546+
Each <<fraction>>-sized track takes a share of the remaining space in proportion to its <a>flex factor</a>.
15471547
For example, given a track listing of ''1fr 2fr'',
15481548
the tracks will take up ⅓ and ⅔ of the <a>leftover space</a>, respectively.
15491549
See [[#flexible-tracks]] for more details.
@@ -1553,7 +1553,7 @@ Track Sizes</h4>
15531553
rather than expanding to fill the entire thing.
15541554

15551555
When appearing outside a ''minmax()'' notation,
1556-
implies an automatic minimum (i.e. ''minmax(auto, <<flex>>)'').
1556+
implies an automatic minimum (i.e. ''minmax(auto, <<fraction>>)'').
15571557

15581558
<dt><dfn function lt="minmax()">minmax(<var>min</var>, <var>max</var>)</dfn>
15591559
<dd>
@@ -1563,10 +1563,10 @@ Track Sizes</h4>
15631563
If the <var>max</var> is less than the <var>min</var>,
15641564
then the <var>max</var> will be floored by the <var>min</var>
15651565
(essentially yielding ''minmax(<var>min</var>, <var>min</var>)'').
1566-
As a maximum, a <<flex>> value sets the track's <a>flex factor</a>;
1566+
As a maximum, a <<fraction>> value sets the track's <a>flex factor</a>;
15671567
it is invalid as a minimum.
15681568

1569-
Note: A future level of this spec may allow <<flex>> minimums,
1569+
Note: A future level of this spec may allow <<fraction>> minimums,
15701570
and will update the <a>track sizing algorithm</a> to account for this correctly
15711571

15721572
<dt><dfn>auto</dfn>
@@ -1648,7 +1648,7 @@ Track Sizes</h4>
16481648
(the ''1fr'' sizes both resolve to ''0'').
16491649
If the sum is less than the <a>grid container</a>’s width,
16501650
the final <a>grid line</a> will be exactly at the end edge of the <a>grid container</a>.
1651-
This is true in general whenever there's at least one <<flex>> value among the <a>grid track</a> sizes.
1651+
This is true in general whenever there's at least one <<fraction>> value among the <a>grid track</a> sizes.
16521652
</div>
16531653

16541654
<div class='example'>
@@ -1862,9 +1862,11 @@ Interpolation/Combination of ''repeat()''</h5>
18621862
<h4 id='flexible-tracks'>
18631863
Flexible Tracks</h4>
18641864

1865-
Tracks sized using <<flex>> values are called <dfn>flexible tracks</dfn>
1865+
Tracks sized using a <<fraction>> of the <a>leftover space</a>
1866+
are called <dfn>flexible tracks</dfn>
18661867
as they flex in response to <a>leftover space</a>
1867-
similar to how <a>flex items</a> with a zero base size fill space in a <a>flex container</a>.
1868+
similar to how <a>flex items</a> with a zero base size
1869+
fill space in a <a>flex container</a>.
18681870

18691871
The distribution of <a>leftover space</a> occurs after all non-flexible <a>track sizing functions</a> have reached their maximum.
18701872
The total size of such rows or columns is subtracted from the available space, yielding the <a>leftover space</a>,
@@ -3576,7 +3578,7 @@ Inline-axis Alignment: the 'justify-self' and 'justify-items' properties</h3>
35763578
that item does not participate in baseline alignment,
35773579
and instead uses its <a>fallback alignment</a>
35783580
as if that were originally specified.
3579-
For this purpose, <<flex>> track sizes count as “intrinsically-sized”
3581+
For this purpose, <<fraction>> track sizes count as “intrinsically-sized”
35803582
when the [=grid container=] has an [=indefinite=] size in the relevant axis.
35813583

35823584
Note: Whether the fallback alignment is used or not
@@ -3599,7 +3601,7 @@ Block-axis Alignment: the 'align-self' and 'align-items' properties</h3>
35993601
that item does not participate in baseline alignment,
36003602
and instead uses its <a>fallback alignment</a>
36013603
as if that were originally specified.
3602-
For this purpose, <<flex>> track sizes count as “intrinsically-sized”
3604+
For this purpose, <<fraction>> track sizes count as “intrinsically-sized”
36033605
when the [=grid container=] has an [=indefinite=] size in the relevant axis.
36043606

36053607
<h3 id='grid-align'>
@@ -3757,7 +3759,7 @@ Grid Sizing</h2>
37573759
<ul>
37583760
<li>A <dfn>fixed sizing function</dfn> (<<length>> or resolvable <<percentage>>).
37593761
<li>An <dfn>intrinsic sizing function</dfn> (''min-content'', ''max-content'', ''grid-template-rows/auto'', ''fit-content()'').
3760-
<li>A <dfn>flexible sizing function</dfn> (<<flex>>).
3762+
<li>A <dfn>flexible sizing function</dfn> (<<fraction>>).
37613763
</ul>
37623764

37633765
The <a>grid sizing algorithm</a> defines how to resolve these sizing constraints into used track sizes.
@@ -3801,7 +3803,7 @@ Grid Sizing Algorithm</h3>
38013803
<li>
38023804
infinity, if any track that it spans
38033805
has a ''max-content'' min sizing function
3804-
or a ''max-content'', ''auto'', or <<flex>> max sizing function.
3806+
or a ''max-content'', ''auto'', or <<fraction>> max sizing function.
38053807
</ul>
38063808

38073809
This is may reduce the amount of re-layout passes that are necessary,
@@ -3886,7 +3888,7 @@ Track Sizing Terminology</h3>
38863888
<dd>
38873889
If the track was sized with a ''minmax()'' function,
38883890
this is the first argument to that function.
3889-
If the track was sized with a <<flex>> value or ''fit-content()'' function,
3891+
If the track was sized with a <<fraction>> value or ''fit-content()'' function,
38903892
''auto''.
38913893
Otherwise, the track's sizing function.
38923894

@@ -4857,7 +4859,7 @@ Changes since the <a href="https://www.w3.org/TR/2020/CRD-css-grid-1-20201218/">
48574859
</blockquote>
48584860

48594861
<li id="change-2020-fr-unit">
4860-
Moved the definition of <<flex>> to [[css-values-4#fractions]],
4862+
Moved the definition of <<fraction>> to [[css-values-4#fractions]],
48614863
as other specs also make use of it.
48624864
(<a href="https://github.com/w3c/csswg-drafts/issues/8027">Issue 8027</a>)
48634865
</ul>
@@ -5553,7 +5555,7 @@ Major Changes</h4>
55535555
when <<percentage>> sizes are used
55545556
in <a lt="fit-content size">fit-content</a>-sized <a>grid containers</a>
55555557
such as ''width/auto''-sized inline or floated <a>grid containers</a>.
5556-
(To avoid this problem, use <<flex>> units instead,
5558+
(To avoid this problem, use <<fraction>> units instead,
55575559
which are intended to maintain their ratios and not overflow
55585560
when the grid is intrinsically-sized.)
55595561
<blockquote>

css-grid-2/Overview.bs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
15951595
<dfn>&lt;line-name-list></dfn> = [ <<line-names>> | <<name-repeat>> ]+
15961596
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( <<length-percentage [0,∞]>> )
15971597
<dfn>&lt;fixed-size></dfn> = <<fixed-breadth>> | minmax( <<fixed-breadth>> , <<track-breadth>> ) | minmax( <<inflexible-breadth>> , <<fixed-breadth>> )
1598-
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<flex [0,∞]>> | min-content | max-content | auto
1598+
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<fraction [0,∞]>> | min-content | max-content | auto
15991599
<dfn>&lt;inflexible-breadth></dfn> = <<length-percentage [0,∞]>> | min-content | max-content | auto
16001600
<dfn>&lt;fixed-breadth></dfn> = <<length-percentage [0,∞]>>
16011601
<dfn>&lt;line-names></dfn> = '[' <<custom-ident>>* ']'
@@ -1624,10 +1624,10 @@ Track Sizes</h4>
16241624
and then resolve against that resulting <a>grid container</a> size
16251625
for the purpose of laying out the <a>grid</a> and its items.
16261626

1627-
<dt><dfn><<flex [0,∞]>></dfn>
1627+
<dt><dfn><<fraction [0,∞]>></dfn>
16281628
<dd>
16291629
A non-negative dimension with the unit ''fr'' specifying the track's <dfn dfn noexport>flex factor</dfn>.
1630-
Each <<flex>>-sized track takes a share of the remaining space in proportion to its <a>flex factor</a>.
1630+
Each <<fraction>>-sized track takes a share of the remaining space in proportion to its <a>flex factor</a>.
16311631
For example, given a track listing of ''1fr 2fr'',
16321632
the tracks will take up ⅓ and ⅔ of the <a>leftover space</a>, respectively.
16331633
See [[#fr-unit]] for more details.
@@ -1637,7 +1637,7 @@ Track Sizes</h4>
16371637
rather than expanding to fill the entire thing.
16381638

16391639
When appearing outside a ''minmax()'' notation,
1640-
implies an automatic minimum (i.e. ''minmax(auto, <<flex>>)'').
1640+
implies an automatic minimum (i.e. ''minmax(auto, <<fraction>>)'').
16411641

16421642
<dt><dfn function lt="minmax()">minmax(<var>min</var>, <var>max</var>)</dfn>
16431643
<dd>
@@ -1647,10 +1647,10 @@ Track Sizes</h4>
16471647
If the <var>max</var> is less than the <var>min</var>,
16481648
then the <var>max</var> will be floored by the <var>min</var>
16491649
(essentially yielding ''minmax(<var>min</var>, <var>min</var>)'').
1650-
As a maximum, a <<flex>> value sets the track's <a>flex factor</a>;
1650+
As a maximum, a <<fraction>> value sets the track's <a>flex factor</a>;
16511651
it is invalid as a minimum.
16521652

1653-
Note: A future level of this spec may allow <<flex>> minimums,
1653+
Note: A future level of this spec may allow <<fraction>> minimums,
16541654
and will update the <a>track sizing algorithm</a> to account for this correctly
16551655

16561656
<dt><dfn>auto</dfn>
@@ -1732,7 +1732,7 @@ Track Sizes</h4>
17321732
(the ''1fr'' sizes both resolve to ''0'').
17331733
If the sum is less than the <a>grid container</a>’s width,
17341734
the final <a>grid line</a> will be exactly at the end edge of the <a>grid container</a>.
1735-
This is true in general whenever there's at least one <<flex>> value among the <a>grid track</a> sizes.
1735+
This is true in general whenever there's at least one <<fraction>> value among the <a>grid track</a> sizes.
17361736
</div>
17371737

17381738
<div class='example'>
@@ -1952,9 +1952,11 @@ Interpolation/Combination of ''repeat()''</h5>
19521952
<h4 id='flexible-tracks'>
19531953
Flexible Tracks</h4>
19541954

1955-
Tracks sized using <<flex>> values are called <dfn>flexible tracks</dfn>
1955+
Tracks sized using a <<fraction>> of the <a>leftover space</a>
1956+
are called <dfn>flexible tracks</dfn>
19561957
as they flex in response to <a>leftover space</a>
1957-
similar to how <a>flex items</a> with a zero base size fill space in a <a>flex container</a>.
1958+
similar to how <a>flex items</a> with a zero base size
1959+
fill space in a <a>flex container</a>.
19581960

19591961
The distribution of <a>leftover space</a> occurs after all non-flexible <a>track sizing functions</a> have reached their maximum.
19601962
The total size of such rows or columns is subtracted from the available space, yielding the <a>leftover space</a>,
@@ -4117,7 +4119,7 @@ Inline-axis Alignment: the 'justify-self' and 'justify-items' properties</h3>
41174119
that item does not participate in baseline alignment,
41184120
and instead uses its <a>fallback alignment</a>
41194121
as if that were originally specified.
4120-
For this purpose, <<flex>> track sizes count as “intrinsically-sized”
4122+
For this purpose, <<fraction>> track sizes count as “intrinsically-sized”
41214123
when the [=grid container=] has an [=indefinite=] size in the relevant axis.
41224124

41234125
Note: Whether the fallback alignment is used or not
@@ -4140,7 +4142,7 @@ Block-axis Alignment: the 'align-self' and 'align-items' properties</h3>
41404142
that item does not participate in baseline alignment,
41414143
and instead uses its <a>fallback alignment</a>
41424144
as if that were originally specified.
4143-
For this purpose, <<flex>> track sizes count as “intrinsically-sized”
4145+
For this purpose, <<fraction>> track sizes count as “intrinsically-sized”
41444146
when the [=grid container=] has an [=indefinite=] size in the relevant axis.
41454147

41464148
<h3 id='grid-align'>
@@ -4298,7 +4300,7 @@ Grid Sizing</h2>
42984300
<ul>
42994301
<li>A <dfn>fixed sizing function</dfn> (<<length>> or resolvable <<percentage>>).
43004302
<li>An <dfn>intrinsic sizing function</dfn> (''min-content'', ''max-content'', ''grid-template-rows/auto'', ''fit-content()'').
4301-
<li>A <dfn>flexible sizing function</dfn> (<<flex>>).
4303+
<li>A <dfn>flexible sizing function</dfn> (<<fraction>>).
43024304
</ul>
43034305

43044306
The <a>grid sizing algorithm</a> defines how to resolve these sizing constraints into used track sizes.
@@ -4560,7 +4562,7 @@ Track Sizing Terminology</h3>
45604562
<dd>
45614563
If the track was sized with a ''minmax()'' function,
45624564
this is the first argument to that function.
4563-
If the track was sized with a <<flex>> value or ''fit-content()'' function,
4565+
If the track was sized with a <<fraction>> value or ''fit-content()'' function,
45644566
''auto''.
45654567
Otherwise, the track's sizing function.
45664568

@@ -5459,7 +5461,7 @@ Changes since the <a href="https://www.w3.org/TR/2020/CRD-css-grid-2-20201218/">
54595461
</blockquote>
54605462

54615463
<li id="change-2020-fr-unit">
5462-
Moved the definition of <<flex>> to [[css-values-4#fractions]],
5464+
Moved the definition of <<fraction>> to [[css-values-4#fractions]],
54635465
as other specs also make use of it.
54645466
(<a href="https://github.com/w3c/csswg-drafts/issues/8027">Issue 8027</a>)
54655467
</ul>
@@ -5508,7 +5510,7 @@ Acknowledgements</h2>
55085510
and contributed illustrations;
55095511
<!-- add this in once we spec it
55105512
to Eric Meyer,
5511-
who asked us to define useful behavior for <<flex>> min track sizes;
5513+
who asked us to define useful behavior for <<fraction>> min track sizes;
55125514
-->
55135515
and Rachel Andrew and Jen Simmons
55145516
who helped bridge the feedback gap between the CSS Working Group

css-images-4/Overview.bs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ Color Stop “Fixup”</h4>
19411941
<pre class=prod>
19421942
&lt;image-1D> = <<stripes()>>
19431943
<<stripes()>> = stripes( <<color-stripe>># )
1944-
<<color-stripe>> = <<color>> && [ <<length-percentage>> | <<flex>> ]?
1944+
<<color-stripe>> = <<color>> && [ <<length-percentage>> | <<fraction>> ]?
19451945
</pre>
19461946

19471947
The <dfn>stripes()</dfn> function defines a [=1D image=]
@@ -1965,13 +1965,13 @@ Color Stop “Fixup”</h4>
19651965
<dd>
19661966
Negative length values are invalid.
19671967

1968-
<dt><dfn><<flex>></dfn>
1968+
<dt><dfn><<fraction>></dfn>
19691969
<dd>
1970-
A <<flex>> is evaluated as a fraction of the |total width|
1971-
relative to the total sum of <<flex>> entries in the function,
1972-
after subtracting the thickness of any non-<<flex>> entries
1970+
A <<fraction>> is evaluated as a fraction of the |total width|
1971+
relative to the total sum of <<fraction>> entries in the function,
1972+
after subtracting the thickness of any non-<<fraction>> entries
19731973
(flooring the subtraction result at zero).
1974-
If the sum of <<flex>> values is less than ''1fr'',
1974+
If the sum of <<fraction>> values is less than ''1fr'',
19751975
the result of the subtraction is multiplied by the sum's value
19761976
before being distributed.
19771977
</dl>
@@ -1997,20 +1997,20 @@ Color Stop “Fixup”</h4>
19971997
will instead give a 30px red stripe and 60px green stripe,
19981998
followed by 100px of blue and then 210px of transparent.
19991999
The 300px of leftover space is multiplied by .3,
2000-
the value of the sum of the <<flex>> values,
2000+
the value of the sum of the <<fraction>> values,
20012001
to obtain only 90px,
20022002
which is then distributed in the 1:2 ratio
2003-
dictated by the <<flex>> values.
2003+
dictated by the <<fraction>> values.
20042004

2005-
(This is similar to how [=flex layout=] deals with small <<flex>> sums on a line,
2005+
(This is similar to how [=flex layout=] deals with small <<fraction>> sums on a line,
20062006
and ensures smoothly continuous behavior
2007-
as the <<flex>> values approach zero.)
2007+
as the <<fraction>> values approach zero.)
20082008
</div>
20092009

20102010
The [=computed value=] of this function is
20112011
an ordered list of stripes,
20122012
each given as a [=computed color=]
2013-
and a thickness represented either a <<flex>> value
2013+
and a thickness represented either a <<fraction>> value
20142014
or a computed <<length-percentage>> value.
20152015

20162016
<!--
@@ -2427,7 +2427,7 @@ Interpolating ''stripes()'' {#interpolating-stripes}
24272427
1. Both the starting and ending image must have the same number of <<color-stripe>>s.
24282428

24292429
2. Each pair of interpolated thicknesses must be of the same type,
2430-
i.e. both must either be of type <<length-percentage>>, or <<flex>>.
2430+
i.e. both must either be of type <<length-percentage>>, or <<fraction>>.
24312431

24322432
If the two images satisfy both constraints,
24332433
they must be interpolated as described below.

0 commit comments

Comments
 (0)