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?
Yes, it's great to preprocess CSS somehow. But do not invent a wheel. There are lots of "standard" options to use: