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

Re: [css3-text] CSS3 suggestion for text-underline

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 18 May 2010 09:37:04 -0700
Cc: Thomas Phinney <tphinney@cal.berkeley.edu>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <1EFC8BDE-AF48-482E-A7C7-5E805EE1DD43@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

On May 18, 2010, at 8:31 AM, Boris Zbarsky wrote:

>> "Should" according to what? Some principal of typographic purity?
> 
> The "make it look good and readable" principle, sorta.

Well that is what I want too, and I think it looks better on the page when the underlines do not fatten up or change distance when the text gets bigger.

> 
>> When I am designing Web pages for computer monitors, I virtually always want the underline to be a single pixel in thickness
> 
> A single device pixel?  On some of the monitors I have lying around here that wouldn't even be all that visible.  Or do you mean single CSS pixel?

CSS pixel. A device pixel would be kind of silly when printed.

>> (especially when used for hyperlinks). Even if I wanted a bigger underline for larger letters (I never actually have, btw), I would want it to be an integer number of pixels thick.
> 
> Integer number of pixels seems reasonable; I believe Gecko does that in fact.
> 
>> As for position, I would much rather it be in a consistent position across different fonts or sizes on the same line.
> 
> In what situation?  If you have:
> 
>  <div>
>    <span
>     style="font-size: 10px; text-decoration: underline">Some</span>
>    more
>    <span
>     style="font-size: 30px; text-decoration: underline">text</span>
>  </div>
> 
> you expect the underlines to line up?  

Yes, I do.

> Even if that means that either the "text" looks terrible or the "Some" looks terrible?

They line up in Webkit, and do not look terrible. In fact, I think Firefox looks worse. Firefox does keep the underline the same size when the underline is assigned to the parent element, but then the thickness is also based on the parent element, when most of the time I would prefer a 1px underline, as in Webkit:

<a style="font-size: 50px;">
   S<span style="font-size: 10px;">ome 
   more text</span>
 </a>

In Firefox, this feels like a hackish way to get a thick bar drawn underneath small text.




Received on Tuesday, 18 May 2010 17:05:23 GMT

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