webmamba/sass-bundle

This package is abandoned and no longer maintained. The author suggests using the symfonycasts/sass-bundle package instead.

Delightful Sass Support for Symfony + AssetMapper

dev-main 2023-07-04 11:12 UTC

This package is not auto-updated.

Last update: 2023-09-15 16:59:50 UTC


README

This bundle make it easy to use Sass with Symfony's AssetMapper Component (no Node required!).

  • Automatically download the correct Sass binary
  • Adds a sass:build command to build and watch your sass changes

Installation

Install the bundle

    composer require webmamba/sass-bundle

Usage

To use generated css, start by including the input file (assets/styles/app.css by default)

{# templates.base.html.twig #}

{% block stylesheets %}
    <link rel="stylesheet" href="{{ asset('styles/app.css') }}">
{% endblock %}

Then you can create your scss file (assets/styles/app.scss by default) And start writing your style.

Then run the command:

    php bin/console sass:build --watch

And Thats it!