PHP code example of rllngr / kirby-scssizer

1. Go to this page and download the library: Download rllngr/kirby-scssizer 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/ */

    

rllngr / kirby-scssizer example snippets


return [
    'rllngr.kirby-scssizer' => [

        // Explicit file pairs: SCSS source => CSS output (paths relative to Kirby root)
        'files' => [
            'assets/scss/main.scss' => 'assets/css/main.css',
        ],

        // Per-template mode: compiles {scssDir}/{template}.scss → {cssDir}/{template}.css
        'templates' => [
            'scssDir' => 'assets/scss',
            'cssDir'  => 'assets/css',
            'default' => 'default', // fallback when no template-specific file exists
        ],

        // Additional @use / @import search paths
        'importPaths' => [],

        // SCSS variables to inject (without the leading $)
        'variables' => [
            'color-primary' => '#3490dc',
        ],

        // 'expanded' | 'compressed' | null (null = auto from Kirby debug flag)
        'outputStyle' => null,

        // true | false | null (null = auto: enabled in debug, disabled in production)
        'autoCompile' => null,
    ],
];

<?= css('assets/css/main.css') 

 snippet('rllngr/kirby-scssizer')