W3C home > Mailing lists > Public > www-style@w3.org > May 2003

Re: Font definition

From: Matt <matt@hogwarts-library.net>
Date: Thu, 29 May 2003 19:10:20 +0100
Message-ID: <005a01c3260d$9205f480$7d2894d9@laptop>
To: <www-style@w3.org>

Ben Godfrey wrote:
>> What about every other value? Wouldn't it be great to be able to
>> declare "variables" at the top of a stylesheet and reference them
>> where needed. Color schemes are the example that spring to mind.
> This would be a powerful way to modularise complicated stylesheets.
> One could set variables and import a set of styles to make use of
> those variables, similar to the way that XSL is sometimes
> modularised.
> This can be done at the moment with the approach of assigning
> selectors to properties rather than vice versa mentioned
> previously, but providing variables would increase the separation
> and maintainability of the individual files. This could be very
> useful in environments with large disparate sites and teams.

Wouldn't it be better to use contants instead of variables? Perhaps an

@constants {
 %mycolour%: #ffc;
 %myothercolor%: #cce;
 %mylength: 2em;

p {
 color: %mycolor%;
 margin-top: %my-length%;

Received on Thursday, 29 May 2003 14:09:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:07 UTC