W3C home > Mailing lists > Public > www-style@w3.org > September 2014

Re: [css3-text] vertical-align and shaping

From: John Daggett <jdaggett@mozilla.com>
Date: Tue, 9 Sep 2014 18:16:20 -0700 (PDT)
To: www-style list <www-style@w3.org>
Message-ID: <1045057240.20343229.1410311780232.JavaMail.zimbra@mozilla.com>

Tab Atkins wrote:

> > For example, I don't see any reason why the two pieces of markup
> > below should be shaped differently:
> >
> >   <span>A</span><span>W</span>
> >   <sup>A</sup><sup>W</sup>
> >
> > I don't see any reason why the kerning applied between the letters
> > in adjacent spans should not be used between adjacent superscript
> > elements.
> Because they're effectively different words, semantically.  And
> this is far more than kerning - you don't want those two to
> ligaturize, or affect character shapes in Arabic, etc.

I don't really see how "semantically" different somehow implies
coalescing can occur in one case but not in another. Worse, using a
presentation attribute like 'vertical-align' is a poor way to infer
that somehow inlines are distinct.

Example - a simple 1px bump in the baseline breaks kerning and ligatures:

  .shift-up span { vertical-align: 1px; }

  <p><span>A</span><span>W</span> <span>f</span><span>i</span></p>
  <p class="shift-up"><span>A</span><span>W</span> <span>f</span><span>i</span></p>

Why should kerning and ligatures be used in one of these but not the other?

I don't think there's any real use case that you're solving by
introducing this "non-baseline values of vertical-align disables
coalescing" rule. In the absence of a real need, CSS should strive
to avoid special-case rules like this that complicate
implementations unnecessarily and result in odd behavior for authors.


John Daggett
Mozilla Japan
Received on Wednesday, 10 September 2014 01:16:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC