computermax2328 Posted January 30, 2014 Share Posted January 30, 2014 Hi All, Right now I am working a project where I want to use a PHP form to ultimately create a CSS file. The idea is that a user can fill in a a form with questions like hex color and fonts, and then that form will process those values into a CSS stylesheet. I know that SASS and LESS do this with Ruby, but I was wondering if there was a way with PHP. Maybe go from PHP to CSS or PHP to SASS to CSS. If anyone has any recourses, docs or videos, on different methods that would be much appreciated. Again, I'm not even sure if PHP can do this. It is just an idea. Thanks in advance, Quote Link to comment https://forums.phpfreaks.com/topic/285813-php-to-sass/ Share on other sites More sharing options...
cyberRobot Posted January 31, 2014 Share Posted January 31, 2014 Have you looked into using file_put_contents() to create the CSS file: http://www.php.net/function.file-put-contents Quote Link to comment https://forums.phpfreaks.com/topic/285813-php-to-sass/#findComment-1467207 Share on other sites More sharing options...
computermax2328 Posted January 31, 2014 Author Share Posted January 31, 2014 Thanks for responding That is definitely a method to consider. I guess the difficult part would be structuring the form data into CSS and then turning it into a string. I will look into it. Does anyone else have a suggestion? Quote Link to comment https://forums.phpfreaks.com/topic/285813-php-to-sass/#findComment-1467214 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.