[ttml2] Ways to make span background height be lineHeight

nigelmegitt has just created a new issue for 
https://github.com/w3c/ttml2:

== Ways to make span background height be lineHeight ==
Many (most?) CSS implementations draw the background box behind inline
 areas with a height less than the line height, meaning that 
successive lines are drawn with gaps between their background areas, 
if there's no block level background color set. We want to be able to 
avoid that situation, since it negatively impacts readability and 
hence accessibility when background colors are applied to spans.

See also the discussions minuted 
[here](https://www.w3.org/2016/02/18-tt-minutes.html#item05) and 
[here](https://www.w3.org/2016/02/25-tt-minutes.html#item05) and [this
 
thread](https://lists.w3.org/Archives/Public/public-tt/2016Feb/0104.html).

## First question: is the height actually defined?

[CSS 2 
§10.6.1](https://www.w3.org/TR/CSS2/visudet.html#inline-non-replaced):

> The height of the content area should be based on the font, but this
 specification does not specify how. A UA may, e.g., use the em-box or
 the maximum ascender and descender of the font. (The latter would 
ensure that glyphs with parts above or below the em-box still fall 
within the content area, but leads to differently sized boxes for 
different fonts; the former would ensure authors can control 
background styling relative to the 'line-height', but leads to glyphs 
painting outside their content area.)
>
>Note: level 3 of CSS will probably include a property to select which
 measure of the font is used for the content height.

See also §10.6.6 and §10.6.7 in that specification.

I'm still trying to work out what this means and whether it provides 
flexibility to implementers to make the inline box height be the same 
as the line height, or if there's some other calculation that applies.

## Second question: do we need syntax and semantics for clarifying it 
in TTML2?

Pending the answer to the first question.

Please view or discuss this issue at 
https://github.com/w3c/ttml2/issues/150 using your GitHub account

Received on Thursday, 3 March 2016 15:04:09 UTC