I was thinking about the T4 template too.
It's Visual Studio only i think, so it's not the most generic way to go, but i thought i'd share it.
<#@ template inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" language="C#v3.5" debug="true" hostSpecific="true" #>
<#@ output extension=".css" #>
<# string font = " font-family: Verdana, Helvetica;\n\tfont-size: 11px;";#>
body {
<#= font #>
}
table.Bid {
background-color:red;
<#= font #>
}
This generates a test.css file with this content:
body {
font-family: Verdana, Helvetica;
font-size: 11px;
}
table.Bid {
background-color:red;
font-family: Verdana, Helvetica;
font-size: 11px;
}