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

Re: [css3-text] Allow control of text-decoration width

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Fri, 25 Mar 2011 17:37:40 -0400
Message-ID: <AANLkTimNiJ17=dn5DbBnOZw-TQdPnP6us4zN-_PKiQES@mail.gmail.com>
To: www-style@w3.org
On Fri, Mar 25, 2011 at 5:22 PM, Aryeh Gregor <Simetrical+w3c@gmail.com> wrote:
> For this to be effective, though, the default value of
> text-underline-width should be given explicitly, not left undefined as
> now.  Is there any reason why we shouldn't have interop here?
> Non-WebKit browsers seem to roughly agree on the underline thickness,
> which I assume is just a multiple of the font-size or some similarly
> simple thing.

I just realized browsers are allowed to vary underline width on
different lines to match average text size or similar.  Quick testing
indicates that

* WebKit (Chrome 11 dev) uses fixed-thickness underlines, as noted.
* Gecko (Firefox 4 final) keys underline thickness solely off the
font-size of the element with text-decoration set on it.
* Opera 11 has different underline thickness and placement on the same
line, in violation of the spec.
* IE 9 has different underline thickness per line, adjusted somehow to
the size of text on the line (apparently according to the maximum font
size on the line).

So IE is the only one that takes advantage of this allowance.  I don't
think we'd lose much of anything by saying that the underline's
thickness must be fixed according to some simple function of the
affected element's font-size by default, like Gecko does.
Interoperability should trump the possibility of browsers producing
slightly nicer underline widths in edge cases, especially since (like
WebKit) they can also use that allowance to produce much worse
underline widths.
Received on Friday, 25 March 2011 21:38:32 GMT

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