Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Switch from normalize.css to normalize.scss #56

Closed
pdehaan opened this issue Sep 3, 2015 · 2 comments
Closed

Switch from normalize.css to normalize.scss #56

pdehaan opened this issue Sep 3, 2015 · 2 comments
Assignees

Comments

@pdehaan
Copy link
Contributor

pdehaan commented Sep 3, 2015

I think we used node-normalize-scss with success on a different project.

Plus it'd let us avoid the weird file rename steps to be able to @import the file into our other Sass files.

gulp.js Usage

Using the gulp-sass plugin.

var gulp = require('gulp');
var sass = require('gulp-sass');

gulp.task('sass', function () {
  gulp.src('path/to/input.scss')
    .pipe(sass({
      // includePaths: require('node-normalize-scss').with('other/path', 'another/path')
      // - or -
      includePaths: require('node-normalize-scss').includePaths
    }))
    .pipe(gulp.dest('path/to/output.css'));
});

— via https://github.com/ranjandatta/node-normalize-scss#gulpjs-usage

/cc @johngruen

@pdehaan
Copy link
Contributor Author

pdehaan commented Sep 14, 2015

Actually, to take this a step further, we could use something like gulp-base64 to inject the 2 images into the tabzilla.css file, and then do away with the whole "vendor" steps completely.

gulp.task('tabzilla-base64', function () {
  return gulp.src(`${NODE_MODULES_PATH}mozilla-tabzilla/css/tabzilla.css`)
    .pipe(base64())
    .pipe(rename('_tabzilla.scss'))
    .pipe(gulp.dest(`${NODE_MODULES_PATH}mozilla-tabzilla/css/`));
});

Although this would increase the size of the CSS from 801B to 5.2K.

Then we can create a _vendor.scss file with something like the following:

@import 'normalize';
@import 'css/tabzilla';

I can create a PR if this seems useful.

@johngruen johngruen self-assigned this Oct 6, 2015
@johngruen johngruen added the ready label Oct 6, 2015
@pdehaan
Copy link
Contributor Author

pdehaan commented Oct 6, 2015

Me thinks this is done via b95efeb. Closing.

@pdehaan pdehaan closed this as completed Oct 6, 2015
@nchapman nchapman removed the ready label Oct 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants