Variable color webpage with SASS and ExpressionEngine

104 views Asked by At

I set up just a static page on my computer using SASS for the styles, and used a variable called $productColor throughout the styles. It's used for a bunch of different stuff like banner background colors, header colors, and link colors.

Now I moved the page to our server, on ExpressionEngine. I would like to have an ExpressionEngine field, so for each entry, a different color can be chosen, and that color will appear on the page.

Now I don't really know how to go about this. I don't even know how or if I can put a sass file on my server and get it automatically compiled into a css file. Anyways, any suggestions?

1

There are 1 answers

0
Jelle Dijkstra On

just define all colors in classes, and have a dropdown with the class names. then in your template do something like this

{exp:channel:entries channel="my_channel"}
<html>
<head>
</head>
<body class="{my_chosen_color}">
--- 
</body>
</html>
{/exp:channel:entries}