Skip to content

Commit 8e934e8

Browse files
committed
[css-values-4] Renamed <<flex>> to <<fraction>>
1 parent a22fcb5 commit 8e934e8

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
@@ -1496,7 +1496,7 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
14961496
14971497
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( <<length-percentage [0,∞]>> )
14981498
<dfn>&lt;fixed-size></dfn> = <<fixed-breadth>> | minmax( <<fixed-breadth>> , <<track-breadth>> ) | minmax( <<inflexible-breadth>> , <<fixed-breadth>> )
1499-
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<flex [0,∞]>> | min-content | max-content | auto
1499+
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<fraction [0,∞]>> | min-content | max-content | auto
15001500
<dfn>&lt;inflexible-breadth></dfn> = <<length-percentage [0,∞]>> | min-content | max-content | auto
15011501
<dfn>&lt;fixed-breadth></dfn> = <<length-percentage [0,∞]>>
15021502
<dfn>&lt;line-names></dfn> = '[' <<custom-ident>>* ']'
@@ -1525,10 +1525,10 @@ Track Sizes</h4>
15251525
and then resolve against that resulting <a>grid container</a> size
15261526
for the purpose of laying out the <a>grid</a> and its items.
15271527

1528-
<dt><dfn><<flex [0,∞]>></dfn>
1528+
<dt><dfn><<fraction [0,∞]>></dfn>
15291529
<dd>
15301530
Specifies the track's <dfn dfn noexport>flex factor</dfn>.
1531-
Each <<flex>>-sized track takes a share of the remaining space in proportion to its <a>flex factor</a>.
1531+
Each <<fraction>>-sized track takes a share of the remaining space in proportion to its <a>flex factor</a>.
15321532
For example, given a track listing of ''1fr 2fr'',
15331533
the tracks will take up ⅓ and ⅔ of the <a>leftover space</a>, respectively.
15341534
See [[#flexible-tracks]] for more details.
@@ -1538,7 +1538,7 @@ Track Sizes</h4>
15381538
rather than expanding to fill the entire thing.
15391539

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

15431543
<dt><dfn function lt="minmax()">minmax(<var>min</var>, <var>max</var>)</dfn>
15441544
<dd>
@@ -1548,10 +1548,10 @@ Track Sizes</h4>
15481548
If the <var>max</var> is less than the <var>min</var>,
15491549
then the <var>max</var> will be floored by the <var>min</var>
15501550
(essentially yielding ''minmax(<var>min</var>, <var>min</var>)'').
1551-
As a maximum, a <<flex>> value sets the track's <a>flex factor</a>;
1551+
As a maximum, a <<fraction>> value sets the track's <a>flex factor</a>;
15521552
it is invalid as a minimum.
15531553

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

15571557
<dt><dfn>auto</dfn>
@@ -1633,7 +1633,7 @@ Track Sizes</h4>
16331633
(the ''1fr'' sizes both resolve to ''0'').
16341634
If the sum is less than the <a>grid container</a>’s width,
16351635
the final <a>grid line</a> will be exactly at the end edge of the <a>grid container</a>.
1636-
This is true in general whenever there's at least one <<flex>> value among the <a>grid track</a> sizes.
1636+
This is true in general whenever there's at least one <<fraction>> value among the <a>grid track</a> sizes.
16371637
</div>
16381638

16391639
<div class='example'>
@@ -1847,9 +1847,11 @@ Interpolation/Combination of ''repeat()''</h5>
18471847
<h4 id='flexible-tracks'>
18481848
Flexible Tracks</h4>
18491849

1850-
Tracks sized using <<flex>> values are called <dfn>flexible tracks</dfn>
1850+
Tracks sized using a <<fraction>> of the <a>leftover space</a>
1851+
are called <dfn>flexible tracks</dfn>
18511852
as they flex in response to <a>leftover space</a>
1852-
similar to how <a>flex items</a> with a zero base size fill space in a <a>flex container</a>.
1853+
similar to how <a>flex items</a> with a zero base size
1854+
fill space in a <a>flex container</a>.
18531855

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

35673569
Note: Whether the fallback alignment is used or not
@@ -3584,7 +3586,7 @@ Block-axis Alignment: the 'align-self' and 'align-items' properties</h3>
35843586
that item does not participate in baseline alignment,
35853587
and instead uses its <a>fallback alignment</a>
35863588
as if that were originally specified.
3587-
For this purpose, <<flex>> track sizes count as “intrinsically-sized”
3589+
For this purpose, <<fraction>> track sizes count as “intrinsically-sized”
35883590
when the [=grid container=] has an [=indefinite=] size in the relevant axis.
35893591

35903592
<h3 id='grid-align'>
@@ -3780,7 +3782,7 @@ Grid Sizing Algorithm</h3>
37803782
<ul>
37813783
<li>A <dfn>fixed sizing function</dfn> (<<length>> or resolvable <<percentage>>).
37823784
<li>An <dfn>intrinsic sizing function</dfn> (''min-content'', ''max-content'', ''grid-template-rows/auto'', ''fit-content()'').
3783-
<li>A <dfn>flexible sizing function</dfn> (<<flex>>).
3785+
<li>A <dfn>flexible sizing function</dfn> (<<fraction>>).
37843786
</ul>
37853787

37863788
The <a>grid sizing algorithm</a> defines how to resolve these sizing constraints into used track sizes.
@@ -3821,7 +3823,7 @@ Grid Sizing Algorithm</h3>
38213823
<li>
38223824
infinity, if any track that it spans
38233825
has a ''max-content'' min sizing function
3824-
or a ''max-content'', ''auto'', or <<flex>> max sizing function.
3826+
or a ''max-content'', ''auto'', or <<fraction>> max sizing function.
38253827
</ul>
38263828

38273829
This is may reduce the amount of re-layout passes that are necessary,
@@ -3894,7 +3896,7 @@ Track Sizing Terminology</h3>
38943896
<dd>
38953897
If the track was sized with a ''minmax()'' function,
38963898
this is the first argument to that function.
3897-
If the track was sized with a <<flex>> value or ''fit-content()'' function,
3899+
If the track was sized with a <<fraction>> value or ''fit-content()'' function,
38983900
''auto''.
38993901
Otherwise, the track's sizing function.
39003902

@@ -4872,7 +4874,7 @@ Changes since the <a href="https://www.w3.org/TR/2020/CRD-css-grid-1-20201218/">
48724874
See [[#layout-algorithm]].
48734875
(<a href="https://github.com/w3c/csswg-drafts/issues/3418">Issue 3418</a>)
48744876
<li id="change-2020-fr-unit">
4875-
Moved the definition of <<flex>> to [[css-values-4#fractions]],
4877+
Moved the definition of <<fraction>> to [[css-values-4#fractions]],
48764878
as other specs also make use of it.
48774879
(<a href="https://github.com/w3c/csswg-drafts/issues/8027">Issue 8027</a>)
48784880
</ul>
@@ -5568,7 +5570,7 @@ Major Changes</h4>
55685570
when <<percentage>> sizes are used
55695571
in <a lt="fit-content size">fit-content</a>-sized <a>grid containers</a>
55705572
such as ''width/auto''-sized inline or floated <a>grid containers</a>.
5571-
(To avoid this problem, use <<flex>> units instead,
5573+
(To avoid this problem, use <<fraction>> units instead,
55725574
which are intended to maintain their ratios and not overflow
55735575
when the grid is intrinsically-sized.)
55745576
<blockquote>

css-grid-2/Overview.bs

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

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

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

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

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

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

17341734
<div class='example'>
@@ -1948,9 +1948,11 @@ Interpolation/Combination of ''repeat()''</h5>
19481948
<h4 id='flexible-tracks'>
19491949
Flexible Tracks</h4>
19501950

1951-
Tracks sized using <<flex>> values are called <dfn>flexible tracks</dfn>
1951+
Tracks sized using a <<fraction>> of the <a>leftover space</a>
1952+
are called <dfn>flexible tracks</dfn>
19521953
as they flex in response to <a>leftover space</a>
1953-
similar to how <a>flex items</a> with a zero base size fill space in a <a>flex container</a>.
1954+
similar to how <a>flex items</a> with a zero base size
1955+
fill space in a <a>flex container</a>.
19541956

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

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

41424144
<h3 id='grid-align'>
@@ -4333,7 +4335,7 @@ Grid Sizing Algorithm</h3>
43334335
<ul>
43344336
<li>A <dfn>fixed sizing function</dfn> (<<length>> or resolvable <<percentage>>).
43354337
<li>An <dfn>intrinsic sizing function</dfn> (''min-content'', ''max-content'', ''grid-template-rows/auto'', ''fit-content()'').
4336-
<li>A <dfn>flexible sizing function</dfn> (<<flex>>).
4338+
<li>A <dfn>flexible sizing function</dfn> (<<fraction>>).
43374339
</ul>
43384340

43394341
The <a>grid sizing algorithm</a> defines how to resolve these sizing constraints into used track sizes.
@@ -4576,7 +4578,7 @@ Track Sizing Terminology</h3>
45764578
<dd>
45774579
If the track was sized with a ''minmax()'' function,
45784580
this is the first argument to that function.
4579-
If the track was sized with a <<flex>> value or ''fit-content()'' function,
4581+
If the track was sized with a <<fraction>> value or ''fit-content()'' function,
45804582
''auto''.
45814583
Otherwise, the track's sizing function.
45824584

@@ -5484,7 +5486,7 @@ Changes since the <a href="https://www.w3.org/TR/2020/CRD-css-grid-2-20201218/">
54845486
(<a href="https://github.com/w3c/csswg-drafts/issues/3418">Issue 3418</a>)
54855487

54865488
<li id="change-2020-fr-unit">
5487-
Moved the definition of <<flex>> to [[css-values-4#fractions]],
5489+
Moved the definition of <<fraction>> to [[css-values-4#fractions]],
54885490
as other specs also make use of it.
54895491
(<a href="https://github.com/w3c/csswg-drafts/issues/8027">Issue 8027</a>)
54905492
</ul>
@@ -5533,7 +5535,7 @@ Acknowledgements</h2>
55335535
and contributed illustrations;
55345536
<!-- add this in once we spec it
55355537
to Eric Meyer,
5536-
who asked us to define useful behavior for <<flex>> min track sizes;
5538+
who asked us to define useful behavior for <<fraction>> min track sizes;
55375539
-->
55385540
and Rachel Andrew and Jen Simmons
55395541
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)