diff options
author | Martijn Cuppens <martijn.cuppens@gmail.com> | 2019-08-28 19:05:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 19:05:56 +0300 |
commit | 89f7a63ee4826b646ec659709cc170b8c45cddbc (patch) | |
tree | aab7f3991699ffe9f423a0599b9e1c75442e6d4d /examples/postcss/gulpfile.js | |
parent | 7a15c1a4e41b1fd46b3f26be3529abc1e2d65a4d (diff) |
Support for every property (#144)
- Support for all properties
- Shorthand mixins for margins and paddings
- Support for custom properties
- Clearer way to declare `!important` rules: `@include rfs(1rem !important)` instead of `@include rfs(1rem, true)`
- Switched to mobile first approach, still possible to switch to the `max-width` media queries if needed
- Configuration variables are changed:
- Base font size -> Base value
- Font size unit -> Unit
- `responsive-font-size` property changed to `rfs()` function (see https://github.com/twbs/rfs/issues/116)
- Dropped `responsive-font-size` mixins
- Dropped Less 2 support since we had to work with lists
- Prevent generation of `/test/expected/main.css`
- Additional tests for new implementations
- Cleanup npm scripts examples
- Code examples in `README.md` are grouped by processor and collapsed
Diffstat (limited to 'examples/postcss/gulpfile.js')
-rw-r--r-- | examples/postcss/gulpfile.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/postcss/gulpfile.js b/examples/postcss/gulpfile.js new file mode 100644 index 0000000..62bbc88 --- /dev/null +++ b/examples/postcss/gulpfile.js @@ -0,0 +1,28 @@ +'use strict'; + +const gulp = require('gulp'); +const postcss = require('gulp-postcss'); +const rfs = require('../../postcss'); + +const options = { + twoDimensional: false, + baseValue: 20, + unit: 'rem', + breakpoint: 1200, + breakpointUnit: 'px', + factor: 10, + class: false, + unitPrecision: 6, + safariIframeResizeBugFix: false, + remValue: 16 +}; + +gulp.task('default', () => { + return gulp.src('./src/main.css') + .pipe(postcss([rfs(options)])) + .pipe(gulp.dest('./dest')); +}); + +gulp.task('watch', () => { + gulp.watch('./src/**/*.css', ['build']); +}); |