gulp-sass-unicode
v1.0.5
Published
Fix unicode usage in 'content'
Downloads
12,632
Maintainers
Readme
gulp-sass-unicode
Replace 'content' unicode after sass compile
Usage
First, install gulp-sass-unicode
as a development dependency:
npm install --save-dev gulp-sass-unicode
Then, add it to your gulpfile.js
:
var sass = require('gulp-sass');
var sassUnicode = require('gulp-sass-unicode');
gulp.task('sass2css', function(){
gulp.src(['style.scss'])
.pipe(sass())
.pipe(sassUnicode())
.pipe(gulp.dest( "css/" ));
});
What it does?
For example, we have style.scss
:
$testContent: "\f26e";
#test{
content: $testContent;
}
And gulp task:
var sass = require('gulp-sass');
gulp.task('SimpleSASS', function(){
gulp.src(['style.scss'])
.pipe(sass())
.pipe(gulp.dest( "css/" ));
});
After run gulp task SimpleSASS
, in file css/style.css
will be next:
@charset "UTF-8";
#test {
content: "";
}
But, if we add gulp-sass-unicode
(see "Usage"), file css/style.css
will have this:
@charset "UTF-8";
#test {
content: "\f26e";
}