PHP code example of drips / scss

1. Go to this page and download the library: Download drips/scss library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

drips / scss example snippets




use Drips\Scss\Compiler;

$scss_file = "path/to/file.scss";
$css_file = "path/to/style.css";

// Inhalt der SCSS-Datei auslesen
$scss = file_get_contents($scss_file);
// SCSS mithilfe des ScssCompilers in CSS übersetzen
$compiler = new Compiler;
$css = $compiler->compile($scss);
// CSS-Code in die jeweilige Datei schreiben
file_put_contents($css_file, $css);



$router->add('scss', '/css/{file}.css', Drips\Scss\Controller::class);