W3C home > Mailing lists > Public > www-html@w3.org > April 2004

Re: opposite of em

From: Mikko Rantalainen <mira@cc.jyu.fi>
Date: Mon, 05 Apr 2004 23:55:50 +0300
Message-ID: <4071C7D6.7060707@cc.jyu.fi>
To: www-html@w3.org

Jewett, Jim J / 2004-04-05 21:31:
> Mikko Rantalainen:
>> Orion Adrian / 2004-04-02 20:12:
>>> Jim Jewett:
>>>>It might make more sense to just give em a strength attribute
>>>>which defaults to 1, but can be negative.
> 
>>>strong.  Now you just have one emphasis element that can represent any 
>>>amount of positive or negative emphasis.
> 
>>I second this. Though the "strength" (or whatever the attribute is 
>>called) should definately be *relative*. 
> 
>>The only problem is, how do you make relative strength to work with 
>>CSS? CSS couldn't add the "strength" values of all the element's 
>>ancestors, last time I checked.
> 
> Why not?  Isn't that what it does with fontsize, if you happen to
> always use relative changes?

The difference is that fontsize is set in the CSS in the first 
place. However, the "strength" is *attribute* for the element and 
CSS cascade order says that you have to apply the style according to 
structure and element's attributes. So you have an element with 
structure HTML > BODY > DIV > EM > SPAN > SPAN > EM and its strength 
is 2. Which color the text inside it should be if I have styles

em::strength(2) { color: red; }
em::strength(3) { color: green; }
em::strength(4) { color: blue; }

??

(Suggest another selector if you think there's some better one. I 
definately think that not having to nest EMs to make them stronger 
isn't that bad so to require ::strength pseudo class. The selector 
[strength=2] isn't a good one because that makes the strength 
attribute absolute and the nesting information is lost.)

-- 
Mikko
Received on Monday, 5 April 2004 16:55:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT