Re: [css3-text] Adjacent and nested underlines (was Allow control of text-decoration width

On Thu, Apr 14, 2011 at 11:27 AM, Koji Ishii <kojiishi@gluesoft.co.jp> wrote:
> You could do this:
>
>  .nu { text-decoration: cancel-underline; }
>  <u><span id=x><span class="nu">foo</span>bar</span>baz</u>

Ah, I see.  That wouldn't be backward-compatible, though, so it
wouldn't be useful in WYSIWYG editors today -- even if the markup is
being produced by a fancy advanced browser that supports
cancel-underline, it still needs to be viewable properly if it's given
to a browser that doesn't support cancel-underline.  But in the
long-term it could be workable, although the markup is long.

> I was thinking, in your example, underlines for "bar" and "baz" will not match if they have different font and/or size if implementation is font/size aware, but then I figured out that fantasai's last proposal[1] would solve the case as well. That's nice, I think we should take that.

At this point, I think fantasai's proposal is fine for my purposes, if
we drop the requirement about gaps being left between adjacent
underlines.  Hopefully we can get a response from another implementer
or two within a few days so we know whether that requirement is
feasible.

The edge case with superscripts still won't work quite right, but it's
an edge case.  If we really need to fix it we can usually do so by
rearranging the markup, and if we can't do that, in the long term we
could use cancel-underline.  So I'm not really worried, especially
since we have so little interop today anyway on such edge cases.

Received on Friday, 15 April 2011 16:40:38 UTC