22858 Posts in 9881 Topics by 2805 members
|Go to End|
6 January 2011 at 2:25am Last edited: 6 January 2011 2:27am
My aim is to extend the siteconfig with some basic fields like Color1, Color2, Color3 and using variables in the css file like background:color:$SiteConfig.Color1. So that I can build a basic theme editor in the backend and let users change basic styling without touching css files.
Is there anybody who succeeded this?
Thank you for any feedback, help, idea..
6 January 2011 at 8:51pm
There isn't anything like this. For any projects which I needed complex CSS I've used the compass (sass) module http://silverstripe.org/compass-module/.
You could also link via Requirements::css() to be PHP file and include variables in that. An example - http://davidwalsh.name/css-variables-php-dynamic
|Go to Top|