Re: User constant declarations in style sheets

You have really understood nothing of this thread.

Expressing the line height is not the subject. The subject is using
constants to create expressions that can be used throughout a style
sheet. In other words, making some things symbolic.

The line height example is just an example. Once the line height is
set, in I don't care what way, it should be possible to express the
rest in terms of a symbolic value that represents it, so when you
want to change the colour of your page through the line height you
can change it in only two places. Example:

const lh: 1.2em;

p { line-height: 1.2em; }
h1 { margin-top: 2lh; margin-bottom: 1lh; }

Instead of predefining yet another relative unit in CSS, a constants
mechanism could help in this and many other situations.

Werner.

Mikko Rantalainen wrote:
> 
> Werner Donné wrote:
> 
>> David Woolley wrote:
>>
>>>> want to keep your text in phase. It would then be natural to
>>>> express heights in terms of the leading, which would be itself
>>>> derived from the font size with a factor. At the moment this
>>>
>>>
>>> This use case is invalid as there is a unit type for line-height,
>>
>>
>> And what is the name, in CSS, of that unit?
> 
> 
> line-height can use a plain number (factor). See the spec:
> http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height
> 
>> I want to be able to express lengths in terms of the line height as
>> a unit.
> 
> 
> (click the <length> in the previous property definition:)
> http://www.w3.org/TR/CSS21/syndata.html#value-def-length
> 
> Read the specification. This mailing list isn't a help desk. Go to 
> news:comp.infosystems.www.authoring.stylesheets for help.
> 

-- 
Werner Donné  --  Re BVBA
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803	e-mail: werner.donne@re.be

Received on Tuesday, 26 April 2005 12:47:50 UTC