Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate CSS with PHP, yes/no?

Is there any reason you should not use PHP to overcome some of the shortcomings of CSS? Live inspection would be harder but are there any functional downsides?

like image 352
mkjeldsen Avatar asked Dec 27 '22 12:12

mkjeldsen


1 Answers

Yes, it's great to preprocess CSS somehow. But do not invent a wheel. There are lots of "standard" options to use:

  • Sass http://sass-lang.com/
  • Turbine http://turbinecss.org/
  • Pornel http://pornel.net/css
  • Less http://lesscss.org/
  • more, just search.
like image 67
Petr Avatar answered Jan 11 '23 07:01

Petr