I want to pass some variables to my css, without using inline styles. During some research I found different sources pointing to the same solution. For example here on the Joomla forum.
Basicly they explain how to use a php file as a stylesheet and incluse the php it like that:
<?php $document->addStyleSheet(.../my-custom-file.css.php'); ?>
Is this good practice? Should I do it like that or is there a better way provided by Joomla? Would this be able to cache? Would it be able to be combined and compressed by some other plugings for performance?
Any insights are most appreciated. Thanks!
filter
templates for the images, and in php only echo the css if it is used. Or I could add some fields to select a layout (grid, masonry) and a field to enter amount of columns... Basicly if php is good practice, it offers endless flexibility.