Hussein Shafie escribi?:
> R?my Bruch wrote:
>
>>I found a problem with the CSS
>>
>>when i use differents overlapped styles (like bold,italic, underline) , the
>>underline style isn't display if it is the first markup.
>>example :
>><bold><italic><underline>xxx</underline></italic></bold> : "xxx is
>>displayed bold, italic and underlined"
>><underline><bold><italic>xxx</italic></bold></underline> : "xxx is
>>displayed bold and italic but not underlined"
>>
>>style use :
>>bold{font-weight: bold;}
>>italic{font-style : italic;}
>>underline{text-decoration: underline;}
>>
> Yes indeed, there is a problem with our implementation of CSS. Our
> problem is that we don't know how to implement the spec in this case.
>
> Excerpts of http://www.w3.org/TR/REC-CSS2, about property text-decoration:
> ---
> This property is *not* inherited, but descendant boxes of a block box
> should be formatted with the same decoration (e.g., they should all be
> underlined). The color of decorations should remain the same even if
> descendant elements have different 'color' values.
> ---
Just a naive suggestion - base the inheritance decision on the 'display'
property value:
- Boxes with 'display: block' (or equivalent) don't inherit decoration
- Boxes with 'display: inline' (or equivalent) do inherit decoration
Inline equivalence means that all the text contents will be concatenated
as a single paragraph.
>
> As a workaround, we suggest this:
>
> ---
> bold { font-weight: bold; text-decoration: inherit; }
> italic { font-style : italic; text-decoration: inherit; }
> underline { text-decoration: underline; }
> ---
The proposed policy is just a generalization of this workaround.
Hope this helps.
--
------------------------------------------------------------------------
Manuel Collado Machuca | Facultad de Informatica UPM
Universidad Politecnica de Madrid | Campus de Montegancedo
Dep. LSIIS | Boadilla del Monte
Tel.+34-91-336.74.57 Fax.+34-91-336.65.95 | 28660 MADRID - SPAIN
------------------------------------------------------------------------