I just included Bourbon but I’m not sure about it, if it’s a best practice or not. Therefore I also started a subject about it, see Sass: Including mixing library (Compass, Bourbon, etc.)?
In case you are interested in “how to include Bourbon in a Ionic2 project”, I proceeded like following:
-
Install Bourbon with npm
sudo npm install --save bourbon
-
Modify your gulpfile.js to include the stylesheets/scss files of Bourbon in your project aka overwrite the ‘sass’ task
gulp.task('sass', function(){ return buildSass({ sassOptions: { includePaths: [ 'node_modules/ionic-angular', 'node_modules/ionicons/dist/scss', 'node_modules/bourbon/app/assets/stylesheets' ] } }); });
-
In your project’s scss file, include Bourbon
@import "_bourbon.scss";
And that’s it, seems to work, I was able to code a gradient background for my buttons using the Bourbon’s mixin linear-gradient.