Enabling Sass in Backoffice-based Extension
The steps described in this section are to guide you through the process of enabling Sass in your Backoffice-based extension.
Prerequisites
You must state in extensioninfo.xml that Backoffice extension is the required extension or indirectly required extension.
Context
You have created and a custom Backoffice-based extension without enabling Sass in the very beginning, or you have an already existing Backoffice-based extension, which was developed before Sass support was introduced. Now, you would like to add Sass to your extension so that it can be used instead of standard CSS. Here are the steps how to enable Sass in the already existing Backoffice-based extension.
Procedure
- Register your extension as Sass extension.
- Create the variables file, where you can define your custom variables.
- Change all your CSS files to SCSS files as per the following example:
- Recompile the extension by running ant clean all and restart the server.