How can I reuse a color in a stylesheet?

css

Solution

Not that I'm aware of, but you could generate your CSS from a .NET page.

Then call it with

And StyleSheet.aspx would look something like

<%@ Page Language="C#" %> 
H1 
{ 
  background-color:<%= MyColourVariable %>; 
}

EDIT: However, today I would suggest using LESS or SASS

Problem

I have a stylesheet and a lot of styles with the same border color (`#CCCCCC` to be precise). Is there a way to specify some kind of variable and reuse that, so instead of typing `#CCCCCC` over and over, I can type: ``` border: 1px solid $bordercolor; ``` P.S. I'm using ASP.NET MVC.

Original source