W3C home > Mailing lists > Public > public-css-testsuite@w3.org > April 2012

Re: Create CSS test suite for CSS Transforms

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 16 Apr 2012 19:06:31 -0400
Message-ID: <2b4aeb842ea4cfb619f07f94f03f1545.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Dirk Schulze" <dschulze@adobe.com>
Cc: "CSS-testsuite" <public-css-testsuite@w3.org>

Le Lun 16 avril 2012 17:33, Dirk Schulze a écrit :
> Hi Peter,
>
> On Apr 16, 2012, at 1:40 PM, Linss, Peter wrote:
>
>> On Apr 16, 2012, at 11:41 AM, Dirk Schulze wrote:
>>
>>> Hi Peter and Elika,
>>>
>>> Is it possible that someone of you prepares CSS Transforms so that is
>>> shows up on http://test.csswg.org/harness/ please? What else needs to
>>> be done by the editors to bring transforms up there?
>>
>> This requires getting that suite as part of the automated build. I'm
>> working on that now, should be online shortly. I don't believe the
>> editors need to do anything at this point.
> That is great! There are just some things to consider. Right now we use
> HTML5 tests to test transformations on SVG elements. Here is one
> example:
>
> <!DOCTYPE html>
> <html>
> <head>
>     <title>CSS Test: SVG patternTransform presentation attribute and
> translation-value argument with em unit on translateX</title>
>     <link rel="author" title="Rebecca Hauck" href="rhauck@adobe.com"/>
>     <link rel="help"
> href="http://www.w3.org/TR/css3-transforms/#svg-transform"/>
>     <link rel="help"
> href="http://www.w3.org/TR/css3-transforms/#two-d-transform-functions"/>
>     <link rel="help"
> href="http://www.w3.org/TR/css3-transforms/#svg-gradient-transform-pattern-transform"/>
>     <link rel="match" href="reftest/svg-patternTransform-ref.html"/>
>     <meta name="flags" content="svg"/>
>     <meta name="assert" content="The patternTransform attribute must
> support functions with the relative length unit 'em' on
> translation-value arguments. The pattern in the test should be moved
> 25 pixels in the X direction resulting in a solid green rect."/>
>     <style type="text/css">
>     svg {
>         width: 100px;
>         height: 100px;
>         background:red;
>         font: Ahem;

Dirk,

the font shorthand requires at minimum 2 font subproperties: font-size
and font-family.

E.g.:
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/font-051.htm

Also, I believe you have to define line-height otherwise Firefox will
apply a 1.2 line-height whereas other browsers will apply a 1.0
line-height. That is for Ahem font.


>         font-size:25px;
>     }
>     </style>
> </head>
> <body>
>     <p>The test passes if there is a green square and no red.</p>
>     <svg>
>         <defs>
>             <pattern id="greenRects" patternUnits="userSpaceOnUse" x="0"
> y="0" width="50" height="50"
> patternTransform="translateX(1em)" >
>                 <rect x="0" y="0" width="25" height="25" fill="green"/>
>                 <rect x="0" y="25" width="25" height="25" fill="green"/>
>             </pattern>
>         </defs>
>         <rect fill="green" x="0" y="0" width="25" height="100"/>
>         <rect fill="green" x="50" y="0" width="25" height="100"/>
>         <rect fill="url(#greenRects)" x="0" y="0" width="100"
> height="100"/>
>     </svg>
> </body>
> </html>
>
> The problem that I see is the inline SVG element. This is not supported
> for HTML 4.01 and therefore the tests can't pass there.

It's possible to embed svg content into an HTML4 <object>

http://www.spartanicus.utvinternet.ie/single_namespace.htm

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Monday, 16 April 2012 23:07:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 April 2012 23:07:17 GMT