rllngr/kirby-scssizer
Composer 安装命令:
composer require rllngr/kirby-scssizer
包简介
Kirby plugin — SCSS compiler powered by scssphp, no Node.js or Ruby required
README 文档
README
A Kirby CMS plugin that compiles SCSS to CSS on the fly — no Node.js or Ruby required. Part of the rllngr plugin set.
Features
- Compiles SCSS to CSS automatically on every request (only when source has changed)
- Two modes: explicit file mapping or per-template compilation
- Expanded output in debug mode, compressed in production — no config needed
- Change detection across all imported partials (
@use,@forward,@import) - SCSS variables injectable from
config.php - Built-in Kirby snippet and page method — place it anywhere in your templates
- Powered by scssphp (pure PHP, no external dependencies)
Requirements
- Kirby 3.9+
- PHP 8.1+
Installation
Via Composer (recommended — installs automatically into site/plugins/):
composer require rllngr/kirby-scssizer
Manually — download or clone into site/plugins/kirby-scssizer, then run composer install inside the folder.
Configuration
In site/config/config.php:
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, ], ];
Usage
Explicit files
Declare your source/output pairs in files. Compilation is triggered automatically — use Kirby's css() helper to include the output:
<?= css('assets/css/main.css') ?>
Per-template
Configure templates and call the built-in snippet or page method from anywhere in your layouts:
<?php snippet('rllngr/kirby-scssizer') ?> // or <?= $page->cssTag() ?>
The snippet is registered by the plugin itself — no file needed in site/snippets/.
Migrating from
snippet('scss'): replace it withsnippet('rllngr/kirby-scssizer').
Credits
Built on top of scssphp by Leaf Corcoran, Anthon Pang and Cédric Morin — MIT license.
License
MIT — Nicolas Rollinger
rllngr/kirby-scssizer 适用场景与选型建议
rllngr/kirby-scssizer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「css」 「sass」 「scss」 「compiler」 「kirby」 「kirby-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rllngr/kirby-scssizer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rllngr/kirby-scssizer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rllngr/kirby-scssizer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Twig extension to insert css as inline styles with a tag
Caching and compression for Twig assets (JavaScript and CSS).
Zend Framework 3+ module that provides assets bundling / caching
bootstrap-sass is a Sass-powered version of Bootstrap 3, ready to drop right into your Sass powered applications.
Define your own css rule-sets for the TYPO3 CMS backend.
Laravel React Boilerplate
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 33
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-03