M
M
Maxim Alyoshin2016-05-20 16:31:25
css
Maxim Alyoshin, 2016-05-20 16:31:25

How to connect normalize to stylus?

$.stylus({
        options: {
          include: './node_modules/normalize.styl/'
        }
      }),

you need to specify the parameters in the stylus object in order to connect normalize like this, @import 'normalize'
but I don’t understand what the parameters are and how to specify them. Tell me please. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Velichko, 2016-05-24
@Zoxon

1. Download normalize.css
2. Put it in the project
3. Change the extension to .styl or set the 'include css' parameter: true

gulp.task('include-css', function() {
  return gulp.src('./css/*.styl')
    .pipe(stylus({
      'include css': true
    }))
    .pipe(gulp.dest('./'));
 
});

4. Connect via @import 'path/to/file.styl'to any file, with 'include css': @import 'path/to/file.css'
true
gulp.task('include-css', function() {
  return gulp.src('./css/*.styl')
  .pipe(stylus({
    use: [
      rupture(),
      autoprefixer({
        cascade: false
      })
    ]
  }))
  .pipe(gulp.dest('./'));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question