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

Re: [CSS21] clip is defined as logical but implementations implement it physical

From: Gérard Talbot <www-style@gtalbot.org>
Date: Fri, 12 Nov 2010 13:43:50 -0800
Message-ID: <f57407d2897cc1022cc2f20cce1be836.squirrel@cp3.shieldhost.com>
To: "Arron Eicholz" <Arron.Eicholz@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>

Le Jeu 11 novembre 2010 15:36, Arron Eicholz a écrit :
> The 'clip' property seems to be defined in the CSS 2.1 spec as a logical
> property being affected by the direction property.

Hello Arron,

Can you quote the spec wrt to this issue?... or is it rather an empirical
deduction of some sort..


> However, most
> implementations implement the 'clip' functionality based on the physical
> sides.
>
> <style type="text/css">
>     div
>     {
>         background: green;
>         border-top: 10px solid red;
>         border-right: 30px solid red;
>         border-bottom: 50px solid red;
>         border-left: 100px solid red;
>         clip: rect(10px, 300px, 210px, 100px);
>         height: 200px;
>         position: absolute;
>         width: 200px;
>     }
> </style>
> <body style="direction: rtl;">
>     <div></div>
> </body>
>

I have created a testcase with your code:

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/clip-logical-vs-physical.html

I will improve that testcase later, in the future.

> I think it would make the most sense to change the CSS 2.1 spec to match
> implementations.
>
> Implementation results:
> IE8: Physical
> Firefox: Physical
> Opera: Physical
> Safari: Physical
> Chrome: Physical
> Konqueror: Logical

Yes, I confirm your findings on Linux platform.

IMO, what CSS 2.1 section 11.1.2
http://www.w3.org/TR/CSS21/visufx.html#clipping
needs and is missing is a schema displaying clearly, in an intuitive and
easy-to-understand manner, those offset values.

Also, the 2 examples
p { clip: rect(5px, 40px, 45px, 5px); }
p { clip: rect(5px, 55px, 45px, 5px); }
should be clearly and cleanly separated from each other. One CSS code
example with one screenshot of expected results (encapsulated). Then, the
other CSS code example with its respective screenshot of expected result.
That way, it's easier to follow, read, understand and does not make the
reader scroll up and down. Also, the examples themselves could be improved
by making offset values bigger... I'm sure there is a lot of improvements
here.

Whatever is decided wrt containing block directionality, the examples
should be improved and a relevant schema illustrating how clipping is done
for each direction should be provided. My main message here is: CSS 2.1
spec should be written and built in a way that helps the most relevant
people who may be using/reading it: the web authors.

regards, Gérard
-- 
CSS 2.1 Test suite RC3 (October 27th 2010)
http://test.csswg.org/suites/css2.1/20101027/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Friday, 12 November 2010 21:44:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT