GSoC PMA week 2: Generating custom themes

Apoorv Khare
Jun 21, 2019 · 1 min read

I’ve completed my second week of GSoC and the main task for this week was to change the files generated by the theme generator for new themes to scss files which were css files earlier. The files were generated dynamically through PHP code.

Initially when the theme generator generated css files after successfully creating a new theme, when the new theme was selected. The pages rendered like this

Image for post
Image for post

The main challenge was that the user selected variables were as PHP variables and were required to be passed to scss files. For this we used PHP files to dynamically generate the scss files by passing the variables as strings.

A lot of code needed to be changed in format though the logic was mostly same. I had to add couple of new controllers which governed file generation as well.

Image for post
Image for post

And finally the theme generator worked all well. And new custom theme can be generated now.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store