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

Re: [CSS 2.1] How to handle rectangle values.

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 04 Mar 2010 10:42:58 -0500
Message-ID: <4B8FD502.2050000@mit.edu>
To: Robert Stam <robert@tallcomponents.com>
CC: www-style@w3.org
On 3/4/10 10:19 AM, Robert Stam wrote:
> All CSS 2.1 properties that can be specified as length value are
> converted to the absolute length at the 'computed value' stage.
> However, the computed value of the 'clip' property is specified as 'For
> rectangle values, a rectangle consisting of four computed lengths;
> otherwise, as specified'.

Right.  In practice, the only value that can happen "otherwise" is "auto".

> Does this mean (in deviation of all other properties) relative lengths
> are not converted to absolute lengths at this stage and can thus be
> inherited?


That said, none of Presto, Webkit, Gecko implement this spec as it's 
currently written, in that they compute "auto" values in the rect to 
"auto", not to lengths [1].  Furthermore, the text for <shape> is 
self-contradictory in that it says:

   The value 'auto' means that a given edge of the clipping region
   will be the same as the edge of the element's generated border box

but then talks about computed widths and heights.  It presumably wants 
to talk about used widths and heights, right?  Can we get these two 
issues corrected, please?


[1] Testcase that should show no red if auto is converted to lengths 
when determining computed style:

<!DOCTYPE html>
     body { clip: rect(0, auto, auto, 0); }
     #outer { position: absolute; clip: inherit;
              border: 5px solid purple; }
     #inner { width: 100px; height: 100px; background: red;
     <div id="outer">
       <div id="inner"></div>
Received on Thursday, 4 March 2010 15:43:34 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:43 UTC