Skip to content

Commit

Permalink
[css-sizing] Specify that sizing properties containing %s are treated…
Browse files Browse the repository at this point in the history
… as property's initial value for intrinsic size contribution. Fixes w3c#1132.
  • Loading branch information
tabatkins authored and fergald committed May 7, 2018
1 parent e49db6c commit 90c77d1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions css-sizing-3/Overview.bs
Expand Up @@ -839,6 +839,16 @@ Intrinsic Contributions</h3>
that contains only that box,
if that hypothetical float's containing block is zero-sized/infinitely-sized.

If the box is [=non-replaced=],
then the value of any [=sizing property=] specified on it
as an expression containing a percentage
(such as ''10%'' or ''calc(10px + 0%)'')
is treated <em>for the purpose of calculating the box’s intrinsic size contribution only</em>
as that property’s initial value.
For example, given a box with ''width: calc(20px + 50%)'',
its max-content contribution is calculated as if its 'width' were ''width/auto''.
The percentage is honored as usual, however, during the actual sizing of the box itself.

However, in the case of a [=replaced element|replaced=] box with a percentage-based 'width'/'max-width'/'height'/'max-height',
the percentage is resolved to zero
when calculating the <a>min-content contribution</a> in the corresponding axis.
Expand Down

0 comments on commit 90c77d1

Please sign in to comment.