Skip to content
Snippets Groups Projects

Migrate Less to SCSS, and setup webpack for scss compilation

Merged Hamayoon Khan requested to merge EMC-288-SASS-compiler into develop
Compare and
191 files
+ 6913
7305
Compare changes
  • Side-by-side
  • Inline
Files
191
+ 9
25
@@ -114,43 +114,27 @@ Use a browser plugin like [ModHeaders](https://bewisse.com/modheader/) to modify
## Step 3: Add style
In the `Gruntfile.js` you need to add the following in the `less` task
In the `webpack.scss.js` you need to add the following in the `entry`
```js
less: {
youId: {
files: {
'src/css/style-youId.css': 'src/less/style-youId.less'
}
}
entry: {
'style-youId': './scss/style-youId.scss'
}
```
and in the `cssmin` task
You need to create the file `src/scss/style-youId.scss`
```js
cssmin: {
youId: {
files: {
'src/css/style-youId.css': 'src/css/style-youId.css'
}
}
}
```
You need to create the file `src/less/style-youId.less`
your `less` files will look like this
your `scss` files will look like this
```less
```scss
@import "style-ceh";
```
but if you want your own colors you can add something like this
```less
@brand-success: #3498DB;
@header-text: #ECF0F1;
```scss
$brand-success: #3498DB;
$header-text: #ECF0F1;
.text-red {color:#E74C3C;}
```
Loading