Re: [CSS21] [css3-text] Text decoration behavior

Alex Mogilevsky wrote:
> First, I want to note the reason "must" in the same sentence as "common case" is not working for
> me is that IE8's goal is full standard compliance. If there is a known corner case where either
> spec of implementation is not working, we have to fix one or the other.
> 
> I agree that the behavior of averaging underline position across adjacent underlined text is the
> best behavior in most cases. However, any rule that has "must" has to cover absolutely all cases,
> or provide a way to make exceptions.
> 
> For text-decoration rules:
> 
> * when applied to underline, single-line is *usually* better, but I don't see a proof that it is
> *always* better. We do in fact know of corner cases where being strictly compliant creates
> undesirable effects (Paul has shown some examples), we do have an implementation that handles it
> but we will have to re-introduce bugs to stay compliant.

Well, I'm not convinced by the cases that have been presented so far.

> * when applied to line-through, I don't think there is even a consensus on preferred behavior,
> except perhaps on *really* simple cases. See attached example - behavior differs a lot across
> implementations, compliant or not. Which is best? How hard is it to define it?
> 
> I believe the whole reason we are having this discussion is that there is a common problem
> (broken underline) which has a simple solution (use one line) which usually works. It is not easy
> to define what exactly constitutes the common case though so the normative rule is specified in a
> way that is too inclusive.
> 
> We should be able to find a way to define a rule that describes the required behavior without
> restricting improvements (as long as they don't affect box sizing). I would prefer not to defer
> that to CSS3.

You have two examples which you claim are a problem.

In the first one, the strike-through doesn't strike through the superscript
two. I don't see this as a problem, in fact it is the behavior I would expect.
Certainly it is the behavior I would get if I were using a typographically-
correct superscript number 2 or if I were crossing out the expression on a
chalkboard. I think <sup>2</sup> should match that.

In the second one, the underline behaves as a strike-through over the subscript.
In this case, a CSS2.1-compliant solution would be to shift the underline down
so that it is below the subscript baseline. In CSS3 you can also specify that
the underline skip subscripts, so another option would be to implement the
text-decoration-skip and specify "-ms-text-decoration-skip: all" on <sub>
elements.

Do implementations vary in how they handle this currently? Yes. But we have
already discussed this and decided on what we want to be the correct way to
handle it, and that is the behavior currently in the spec. I'm not convinced
that it is broken, much less sufficiently broken to change at this point.

~fantasai

Received on Tuesday, 11 March 2008 03:02:37 UTC