- 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
- need to install bourbon via
- 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. - Must manually specify the icon font path since relative path breaks when you import
blueprint.scss
in your application- do this with
$icon-font-path: "~@blueprintjs/core/resources/icons";
- do this with
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.compare = function(array) { | |
if (!array) { | |
return false; | |
} | |
if (this.length !== array.length) { | |
return false; | |
} | |
for (var i = 0, l = this.length; i < l; i++) { | |
if (this[i] instanceof Array && array[i] instanceof Array) { | |
if (!this[i].compare(array[i])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import classNames from 'classnames' | |
import { Classes, Intent } from '@blueprintjs/core' | |
render() { | |
let classes | |
// method one | |
classes = classNames('pt-tag','pt-large', { | |
[Classes.INTENT_DANGER]: daysElapsed > 7, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
In PHP, say we have the following:
$sampleImageBase64 = 'R0lGODlhGQAZAPAAAO0cJAAAACH5BAAAAAAALAAAAAAZABkAAAIXhI+py+0Po5y02ouz3rz7D4biSJamWAAAOw==';
$sampleImageBinary = base64_decode($sampleImageBase64);
$sampleImageHexadecimal = bin2hex($sampleImageBinary);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="column row" data-sticky-container> | |
<div class="title-bar" data-sticky data-sticky-on="small" data-margin-top="0"> | |
<p>Place the pickles in a wok, and decorate tenderly with shredded gravy. Place the pickles in a wok, and decorate tenderly with shredded gravy. Place the pickles in a wok, and decorate tenderly with shredded gravy.</p> | |
<div class="title-bar-left"></div> | |
<div class="title-bar-right"> </div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check if form element has attributes using getNamedItem() on the attributes interface | |
if (trailerDetailsFormSection['type'].attributes.getNamedItem('required')) { | |
// remove named attribute also using the attributes interface via removeNamedItem(); | |
trailerDetailsFormSection['type'].attributes.removeNamedItem('required'); | |
} | |
// ... and is equivalent to running | |
// see https://lists.w3.org/Archives/Public/www-dom/2001JanMar/0094.html for explanation | |
trailerDetailsFormSection['type'].removeAttribute('required'); |