[thelist] CSS variables ?
Hassan Schroeder
hassan.schroeder at gmail.com
Thu Apr 17 17:18:31 CDT 2008
On Thu, Apr 17, 2008 at 2:40 PM, Bojan Tesanovic <btesanovic at gmail.com> wrote:
> What I need is to define 4 colors at the top of CSS and use those
> through out CSS.
> $color1 = darkblue;
> h1{color: $color1}
Generate your CSS on the fly using the scripting language of your
choice.
I pretty much always do style sheets as JSPs so it would look like
h1 { color: ${foregroundColor}; }
Makes it wonderfully easy to tweak, especially if you set it up to pass
in the values as parameters to the page, or through a separate color
parameter form page.
HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com
More information about the thelist
mailing list