I followed this tutorial https://css-tricks.com/css-variables-with-php/ to use php variables in CSS. I am using concrete5(version 5.6) CMS. I loaded both .php and .css files.
NewFile.php
<?php
header("Content-type: text/css; charset: UTF-8");
$clRed = 'red';
?>
NewFile.css
@import "/path/css/NewFile.php?type=cms";
.one-third{
width: 33%;
margin: 0 auto;
background: <?php echo $clRed;?>;
}
but css is not reading the php variables.
I also referred these links
http://doctype.com/use-php-variables-inside-css-file
how can I use of a php variable into a .css file
PHP Variables in CSS not working
Thanks in advance. Note: I know it's not a recommended practice.