Grovebranch StyleManager

A .NET CSS manager for easily combining, minifying, and extending CSS for ASP.NET websites and web apps.


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Define constants in the CSS file itself on Sat Feb 11, 2012 11:06 am

Great component. Would like to be able to define constants at the top of the CSS file rather than in config/xml/code. E.g.,

/* $AttentionColor = #a6f */

View user profile

2 Re: Define constants in the CSS file itself on Wed Feb 15, 2012 6:39 pm

Admin


Admin

I can see how that could be more convenient. I don't see any problems with it other than if the constant was declared more than once. I suppose if it was declared in the given CSS file, then it would override any other declarations. I'll have to think about this a bit more.

Perhaps...
Global values supplied programmatically or via XML are treated as "default" values.
When all CSS is loaded, if there are constants declared in them and not globally, then it uses the first found declaration as the default.
Then, as each CSS file is processed, if it contains a constant declaration which differs from the default, then it overrides the default.

How does that sound?


View user profile http://stylemanager.forumotion.com

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum