Skip to content

Commit b3db709

Browse files
committed
[css-sizing-4] Define the intrinsic-* family of sizing properties. Closes w3c#4229.
1 parent 1c731bc commit b3db709

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

css-sizing-4/Overview.bs

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,104 @@ Max-content Sizes in Constrained-height Multi-column Layout</h3>
604604
this approximation collapses to simply doing a layout,
605605
and measuring the resulting columns.
606606

607+
608+
609+
<h2 id="intrinsic-contribution">
610+
Intrinsic Size Contributions</h2>
611+
612+
A box’s <a>min-content contribution</a>/<a>max-content contribution</a> in each axis
613+
is the size of the content box
614+
of a hypothetical ''width/auto''-sized float
615+
that contains only that box,
616+
if that hypothetical float's containing block is zero-sized/infinitely-sized.
617+
618+
However, if the box has an [=explicit intrinsic inner size=] in an axis,
619+
then the box's [=automatic size=] in that axis
620+
is calculated by assuming the [=explicit intrinsic inner size=]
621+
as its [=inner size=] in that axis.
622+
623+
Note: This specification does not define precisely how to determine these sizes.
624+
Please refer to [[CSS2]],
625+
the relevant CSS specification for that display type,
626+
the <a href="#percentage-sizing">rules for handling percentages</a> (below),
627+
and/or existing implementations
628+
for further details.
629+
630+
631+
<h3 id='intrinsic-size-override'>
632+
Overriding Intrinsic Sizes: the 'intrinsic-*' properties</h3>
633+
634+
<pre class="propdef">
635+
Name: intrinsic-block-size, intrinsic-inline-size, intrinsic-height, intrinsic-width
636+
Value: legacy | auto | <<length-percentage>>
637+
Initial: legacy
638+
Inherited: no
639+
Applies to: all elements except [=non-replaced=] [=inlines=]
640+
Computed value: as specified, with <<length-percentage>> values computed
641+
Percentages: relative to width/height of [=containing block=]
642+
Animation type: by computed value type
643+
</pre>
644+
645+
The 'intrinsic-*' properties determine
646+
whether the [=intrinsic size contributions=] of a box
647+
are calculated from sizes derived from its content
648+
or from a specified <dfn export>explicit intrinsic inner size</dfn>.
649+
See [[#intrinsic-contribution]].
650+
Values are defined as follows:
651+
652+
<dl dfn-type=value dfn-for="intrinsic-block-size, intrinsic-inline-size, intrinsic-height, intrinsic-width, intrinsic-size">
653+
: <dfn>legacy</dfn>
654+
::
655+
Does not specify an [=explicit intrinsic inner size=] of the box
656+
in the relevant axis.
657+
(Intrinsic size contribution are thus determined in various ways
658+
based on examining the content of the box as usual.
659+
See [[#intrinsic]], for example.)
660+
661+
662+
: <dfn>auto</dfn>
663+
::
664+
If 'overflow' is not ''visible'' in the relevant axis,
665+
specifies a zero [=explicit intrinsic inner size=]
666+
in that axis.
667+
Otherwise same as ''legacy''.
668+
669+
: <dfn><<length-percentage>></dfn>
670+
::
671+
Specifies an [=explicit intrinsic inner size=]
672+
in the relevant axis.
673+
</dl>
674+
675+
<pre class="propdef shorthand">
676+
Name: intrinsic-size
677+
Value: <<'intrinsic-width'>> <<'intrinsic-height'>>?
678+
</pre>
679+
680+
The 'intrinsic-size' property is a [=shorthand=]
681+
for setting all the 'intrinsic-*' properties in one declaration.
682+
683+
The first value sets 'intrinsic-width',
684+
and the second value sets 'intrinsic-height'.
685+
If the second value is omitted,
686+
it defaults to the first.
687+
688+
Issue: When we figure out how to make other physical x/y shorthands,
689+
like 'background-size',
690+
work with logical sizes,
691+
we'll apply the same logic here.
692+
693+
694+
695+
<!--
696+
████████ ██ ██ ████████ ████████ ████ ██ ██ ██████ ████ ██████
697+
██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██
698+
██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██
699+
██████ ███ ██ ████████ ██ ██ ██ ██ ██████ ██ ██
700+
██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██
701+
██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██
702+
████████ ██ ██ ██ ██ ██ ████ ██ ██ ██████ ████ ██████
703+
-->
704+
607705
<h2 id='extrinsic'>
608706
Extrinsic Size Determination</h2>
609707

0 commit comments

Comments
 (0)