I am creating a css file using php to generate it. My problem is that I lost all coloring of the css. I can’t find a package to fix this… What are my options?


The language package has to be specifically designed to support embedding another language. Please share one of your files so that we can get a better picture of what you’re working with.

    header("Content-type: text/css; charset: UTF-8");
    $pattern = $sql->fetch_row('select pattern_id, pattern_format ...');
.cover {
    background-image: url("/pattern<?php echo @$pattern['pattern_id'] ?>.<?php echo @$pattern['pattern_format'] ?>");
    background-size: 350px 350px;


Do you have this in individual files, or is there a possibility of CSS declarations being used inside a PHP file that also generates HTML?


This is a php file that generates only css. I declare that it is a css file in the header (line 2). I am changing dynamically a background image because in the admin page there is an option to change the image.