Skip to content

Commit

Permalink
[css-display-4] Use combinatorial keywords instead of 'reading-and-la…
Browse files Browse the repository at this point in the history
…yout'. #7387
  • Loading branch information
fantasai committed Jan 19, 2023
1 parent 07501c6 commit a005500
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions css-display-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1014,9 +1014,7 @@ Display Order Shorthand: the 'order' property</h3>
<pre class='propdef shorthand'>
Name: order
Value: [ <<'layout-order'>> <<'reading-order'>>? ] |
[ reading && <<'reading-order'>> ] |
[ layout && <<'layout-order'>> ] |
[ reading-and-layout && <<integer>> ]
[ [ reading || layout ] && <<integer>> ]
Applies to: [=flex items=] and [=grid items=]
Inherited: no
</pre>
Expand All @@ -1038,9 +1036,34 @@ Display Order Shorthand: the 'order' property</h3>

The 'order' property sets both 'layout-order' and 'reading-order'
in a single declaration.
Unless <dfn value for=order>reading-and-layout</dfn> is specified--
in which case both <<'reading-order'>> and <<'layout-order'>> are set to the specified <<integer>> value--
the omitted [=longhand=] is <em>set to zero</em>.
Values have the following meanings:

<dl dfn-for=order dfn-type=value>
<dt><dfn><<integer>></dfn>
<dd>
If one integer and no keyword is specified,
then sets 'layout-order' to the specified integer,
and sets 'reading-order' to its [=initial value=].
If two integers are specified,
the first sets 'layout-order' and the second sets 'reading-order'.
Otherwise sets the appropriate [=longhand=](s) to the specified integer(s).

<dt><dfn>layout</dfn>
<dd>
Indicates setting 'layout-order' to the specified integer.
If ''reading'' is not specified,
'reading-order' is set to its [=initial value=].

<dt><dfn>reading</dfn>
<dd>
Indicates setting 'reading-order' to the specified integer.
If ''layout'' is not specified,
'layout-order' is set to its [=initial value=].
</dl>

Note: The single-integer syntax sets only 'layout-order',
in order to enable rearranging layout for better visual display
without changing the underlying reading order.

<div class='example'>
Here's an example of a catalog item card
Expand Down Expand Up @@ -1189,7 +1212,7 @@ Box Order: the 'layout-order' property</h3>
Specifically, the 'layout-order' property controls the order in which
[=flex items=] or [=grid items=] appear within their container
by assigning them to the ordinal groups,
as specified by its <dfn value for=order><<integer>></dfn> value.
as specified by its <dfn value for=layout-order><<integer>></dfn> value.

[=flex container|Flex=] and [=grid containers=] then lay out their contents
in <dfn export>order-modified document order</dfn>,
Expand Down

0 comments on commit a005500

Please sign in to comment.