W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2009

t1604-c542-letter-sp-01-b-a.htm: Test case validates undefined behavior

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Fri, 27 Feb 2009 18:08:48 -0800
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <66D5CB5D6AB0694592FAF5487C50368B29B55CB852@NA-EXMSG-C111.redmond.corp.microsoft.com>
http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/t1604-c542-letter-sp-01-b-a.htm

According to comment in the source, this testcase expects letter-spacing to be divided and split evenly on each side of a character. 

Taking the rules in the testcase:

<style type="text/css">
   div { font: 24px/1 Ahem; width: 15em; background: yellow; color: aqua; margin: 0 0 0 2em; }
   .eight {letter-spacing: 48px;}
   .nine {letter-spacing: normal;}
</style>

...we apply them to the following markup:

<div class="eight"> ab <span class="nine">cd ef</span> </div>

The testcase expects 96px of space between the b and c characters. Major browsers currently render 120px worth of space by:
- Adding 48px of letter-spacing after the b
- Using 24px for the space
- Adding 48px of letter-spacing after the space

For a total of 120px.

But if one were to "distribute letter spacing evenly on both sides of each letter" per the comment in the testcase then the user agent would:
- Add 24px of letter-spacing after b
- Add 24px of letter-spacing before the space
- Use 24px for the space
- Add 24px of letter-spacing after the space.

This would result in a 96px space.

The CSS2.1 specification does not currently define letter-spacing distribution.

This test case is currently invalid and needs to be removed.

--
Thanks,
Arron Eicholz
Received on Saturday, 28 February 2009 02:09:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:57 GMT