Skip to content

Instantly share code, notes, and snippets.

@puiutucutu
Created August 3, 2017 03:18
Show Gist options
  • Save puiutucutu/d0881c6b1340d5f9a31c2a2b90681393 to your computer and use it in GitHub Desktop.
Save puiutucutu/d0881c6b1340d5f9a31c2a2b90681393 to your computer and use it in GitHub Desktop.
Getting Foundation 6.4.1 to play nice with Palantir Blueprint 1.24.0

Steps

  1. In order to import blueprint.scss like @import "~@blueprintjs/core/src/blueprint";
    • need to install bourbon via npm install bourbon@4.3.2 --save as of Palantir Blueprint 1.24.0
  2. Foundation and Palantir Blueprint both use scss variables $switch-height and $switch-height-large and will result in a conflict when compiling the scss files. The solution involves resetting the variables to zero after loading Foundation but before loading Blueprint.
  3. Must manually specify the icon font path since relative path breaks when you import blueprint.scss in your application
/**
* 1 - Foundation
*/
@import "~foundation-sites/scss/foundation";
/**
* Foundation compatibility with Palantir Blueprint requires
* resetting these variables to zero because both libraries use
* the same variable names internally.
*/
$switch-height: 0;
$switch-height-large: 0;
/**
* 2 - Palantir Blueprint
*/
$icon-font-path: "~@blueprintjs/core/resources/icons"; // see https://github.com/palantir/blueprint/issues/123
@import "~@blueprintjs/core/src/blueprint"; // requires bourbon 4.3.2 installed as dependency via `npm install bourbon@4.3.2 --save`
@import "~@blueprintjs/datetime/dist/blueprint-datetime.css";
/**
* 3 - Application
*/
@import 'app/app';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment