Skip to content

Commit

Permalink
[css-sizing-4] Define the intrinsic-* family of sizing properties. Cl…
Browse files Browse the repository at this point in the history
…oses #4229.
  • Loading branch information
tabatkins committed Oct 10, 2019
1 parent 1c731bc commit b3db709
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions css-sizing-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,104 @@ Max-content Sizes in Constrained-height Multi-column Layout</h3>
this approximation collapses to simply doing a layout,
and measuring the resulting columns.



<h2 id="intrinsic-contribution">
Intrinsic Size Contributions</h2>

A box’s <a>min-content contribution</a>/<a>max-content contribution</a> in each axis
is the size of the content box
of a hypothetical ''width/auto''-sized float
that contains only that box,
if that hypothetical float's containing block is zero-sized/infinitely-sized.

However, if the box has an [=explicit intrinsic inner size=] in an axis,
then the box's [=automatic size=] in that axis
is calculated by assuming the [=explicit intrinsic inner size=]
as its [=inner size=] in that axis.

Note: This specification does not define precisely how to determine these sizes.
Please refer to [[CSS2]],
the relevant CSS specification for that display type,
the <a href="#percentage-sizing">rules for handling percentages</a> (below),
and/or existing implementations
for further details.


<h3 id='intrinsic-size-override'>
Overriding Intrinsic Sizes: the 'intrinsic-*' properties</h3>

<pre class="propdef">
Name: intrinsic-block-size, intrinsic-inline-size, intrinsic-height, intrinsic-width
Value: legacy | auto | <<length-percentage>>
Initial: legacy
Inherited: no
Applies to: all elements except [=non-replaced=] [=inlines=]
Computed value: as specified, with <<length-percentage>> values computed
Percentages: relative to width/height of [=containing block=]
Animation type: by computed value type
</pre>

The 'intrinsic-*' properties determine
whether the [=intrinsic size contributions=] of a box
are calculated from sizes derived from its content
or from a specified <dfn export>explicit intrinsic inner size</dfn>.
See [[#intrinsic-contribution]].
Values are defined as follows:

<dl dfn-type=value dfn-for="intrinsic-block-size, intrinsic-inline-size, intrinsic-height, intrinsic-width, intrinsic-size">
: <dfn>legacy</dfn>
::
Does not specify an [=explicit intrinsic inner size=] of the box
in the relevant axis.
(Intrinsic size contribution are thus determined in various ways
based on examining the content of the box as usual.
See [[#intrinsic]], for example.)


: <dfn>auto</dfn>
::
If 'overflow' is not ''visible'' in the relevant axis,
specifies a zero [=explicit intrinsic inner size=]
in that axis.
Otherwise same as ''legacy''.

: <dfn><<length-percentage>></dfn>
::
Specifies an [=explicit intrinsic inner size=]
in the relevant axis.
</dl>

<pre class="propdef shorthand">
Name: intrinsic-size
Value: <<'intrinsic-width'>> <<'intrinsic-height'>>?
</pre>

The 'intrinsic-size' property is a [=shorthand=]
for setting all the 'intrinsic-*' properties in one declaration.

The first value sets 'intrinsic-width',
and the second value sets 'intrinsic-height'.
If the second value is omitted,
it defaults to the first.

Issue: When we figure out how to make other physical x/y shorthands,
like 'background-size',
work with logical sizes,
we'll apply the same logic here.



<!--
████████ ██ ██ ████████ ████████ ████ ██ ██ ██████ ████ ██████
██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██
██████ ███ ██ ████████ ██ ██ ██ ██ ██████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██
████████ ██ ██ ██ ██ ██ ████ ██ ██ ██████ ████ ██████
-->

<h2 id='extrinsic'>
Extrinsic Size Determination</h2>

Expand Down

0 comments on commit b3db709

Please sign in to comment.