TL;DR: would you run
gulpon a production server everytime an admin saves the theme customization settings?
I've been using gulp+sass+WordPress for some time and now I am developing a theme in which the end user will be able to change the colors via the customizer.
I'm used at having a
variables.scss with all my colors and stuff.
My first step was to seed this
variables.scss with the customizer variables via an action on
Of course that works as in I have all the colors I chose on the customizer written into my
variables.scss and when I run
gulp on my development machine it gets the corret values and everything is great...
Except I did not think about the production machine.
I was not planning on having gulp installed on my production machine so, with my current workflow I don't see a way to keep using sass variables for colors and fonts.
I know I can solve it getting all the afectd styles out of sass and into a regular
.css file that would be apendend after the regular compiled
main.css but it seems like a major step back.
I do use a lot of the sass functions (darken, lighten, transparentize…) to play with the base colors so it's not just move everything to a non-compiled stylesheet.
If this was a general programming question I would be posting that on software enginerring stack exchange, not on regular stack overflow but I guess even if it is not a code problem, beeing so WordPress centric it fits better here than on softwareengineering.