W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [css-sizing] Percentage contributions to intrinsic sizing

From: Simon Sapin <simon.sapin@exyr.org>
Date: Thu, 19 Mar 2015 12:54:09 +0100
Message-ID: <550AB8E1.2040100@exyr.org>
To: www-style@w3.org
On 19/03/15 06:01, fantasai wrote:
>     B) Treat percentages as zero:
>          - percentages contribute zero to the intrinsic size
>          - once the item is sized, the percentages are still treated as zero

So during layout percentages may or may not be treated as zero based on… 
what exactly? This is not obvious to define.

Servo computes the intrinsic sizes of everything eagerly (in a parallel 
bottom-up tree traversal), so it’s not easy to determine whether a given 
intermediate result has affected a used width arbitrarily "far away" in 
the ancestors.

For example:

   <section style="float: left">
     <div style="width: 100px">
       <ul>
         <li style="margin: 10%">

Because one of the intermediate ancestors has a fixed width, the 
percentage margin of the <li> does not affect the used width of the 
<section> (or any other ancestor), even if it contributed to the 
intrinsic size of the <ul>.

-- 
Simon Sapin
Received on Thursday, 19 March 2015 11:54:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC