You are here: Re: inherited styles « HTML « IT news, forums, messages
Re: inherited styles

Posted by Toby Inkster on 03/12/06 14:57

Jukka K. Korpela wrote:
> jb <jb@not-aol.com> wrote:
>
>> It seems like a glaring omission.
>
> That's mainly because you haven't studied CSS.

I dunno. I think a way of defining a few constants, particularly for
colours could be handy, as sometimes certain values need to be reused, in
ways that CSS inheritance can't deal with. Something like...

@define "mainbg" "white";
@define "pale" "#efe";
@define "medium" "#9c9";
@define "dark" "#393";
@define "mainfg" "black";

BODY {
color: def("mainfg");
background: def("mainbg");
}
H1 {
color: def("dark");
background: def("mainbg");
}
H2 {
color: def("mainfg");
background: def("pale");
}
..sidepanel {
color: def("mainfg");
background: def("pale");
float: left;
width: 25%;
border: medium double def("medium");
}
..specialbox {
color: def("mainbg");
background: def("medium");
border: medium double def("dark");
}

It would make it really easy to change a site's colour scheme without
changing the rest of the styles.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация