Re: [CSS21] 16.3.1 text-decoration: inline box vs. inline element

I posted some questions on this property a while ago [1, 2] which 
never quite got answered i think. Boris and Jukka helped point out 
some of the issues with the old style underlining (sub/super), but i 
don't think anyone explained why the new way of defining the property 
is better (sub is probably more of an issue in the new model).

The main problem i see with the new way is that underlines are 
expected to overwrite images and form controls:

<p style="text-decoration: underline">
  Text <img src="dummy.png" style="vertical-align: top"/>
<p style="text-decoration: underline">
  Text-inputs are considered to have a baseline <input type="text" /> 
 in most implementations.
<p style="text-decoration: underline">
  Buttons as well <input type="button" value="DontPress"/> 

At least that's how i read:
"Text decorations on inline boxes are drawn across the entire 
element, going across any descendant elements without paying any 
attention to their presence."

All vertically aligned texts will probably also work poorly in the 
new model:
<p style="text-decoration: underline">
  <small style="vertical-align: bottom">small text</small> <big>Big 

You cannot stop this behavior using default styles. That is:
button {text-decoration: none}
will have no effect on the underline drawn across the button above.

As a side note i also think the CSS3-text properties 
'text-underline-mode', 'text-line-through-mode', 'text-overline-mode'
means any node in the tree may need to know where all the white-space 
characters of its descendants are in order to know where to draw its 

Finally i find the number of MAYs in CSS3 (
text/#text-decoration-introduction) regarding text-decoration and the 
"backwards-compatibility" disclaimer in CSS 2.1 slightly depressing.



Received on Wednesday, 31 March 2004 12:07:58 UTC