Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perkovec/gulp-sass-unicode
Replace 'content' unicode after sass compile
https://github.com/perkovec/gulp-sass-unicode
Last synced: 3 months ago
JSON representation
Replace 'content' unicode after sass compile
- Host: GitHub
- URL: https://github.com/perkovec/gulp-sass-unicode
- Owner: Perkovec
- Created: 2016-04-17T12:20:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:19:33.000Z (about 2 years ago)
- Last Synced: 2024-04-15T00:17:01.206Z (10 months ago)
- Language: CSS
- Homepage:
- Size: 638 KB
- Stars: 12
- Watchers: 5
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gulp-sass-unicode
> Replace 'content' unicode after sass compile## Usage
First, install `gulp-sass-unicode` as a development dependency:
```shell
npm install --save-dev gulp-sass-unicode
```Then, add it to your `gulpfile.js`:
```javascript
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``:
```css
$testContent: "\f26e";#test{
content: $testContent;
}
```And gulp task:
```javascript
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:
```css
@charset "UTF-8";
#test {
content: "";
}
```
But, if we add ``gulp-sass-unicode`` (see "Usage"), file ``css/style.css`` will have this:
```css
@charset "UTF-8";
#test {
content: "\f26e";
}
```