- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 10 Sep 2014 00:37:46 -0700
- To: John Daggett <jdaggett@mozilla.com>
- Cc: www-style list <www-style@w3.org>
On Tue, Sep 9, 2014 at 6:16 PM, John Daggett <jdaggett@mozilla.com> wrote: > 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. There is a very real need. Words sometimes have multiple superscripts. In languages where it matters, these should not join. For example, say you have multiple footnotes at one point, and you're using letters as footnote indicators, like foo^ABC in English. In Arabic, each of the letters should be using the "isolated" shape, but if superscripts aren't automatically a break, they'll instead form a word, with A, B, and C being in initial/medial/final shapes instead; it'll look nonsensical. ~TJ
Received on Wednesday, 10 September 2014 07:38:33 UTC