npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

blueprint-sass-compile

v1.0.0

Published

compile blueprint.scss from source

Downloads

3

Readme

blueprint-sass-compile

a handy little package to compile blueprint.scss from source

usage

yarn install --dev blueprint-sass-compile

package.json

{
  "scripts": {
    "build:css": "blueprint-sass-compile <path>",
    "watch:css": "blueprint-sass-compile <path> --watch",
  }
}

_blueprint_variables.scss

Make a file to hold all your Blueprint variable overrides. Be sure to import this first thing in your main Sass file.

What variables are available? See below for links to source code, the ultimate source of truth.

@import '~@blueprintjs/core/lib/scss/variables';

$g: 4px;

//
// Blueprint public vars
//
$pt-grid-size: $g * 2;
$pt-border-radius: $g;

$pt-font-size: $g * 3;
$pt-font-size-large: $pt-font-size + 1px;
$pt-font-size-small: $pt-font-size - 1px;
$pt-line-height: 4 / 3;

//
// Blueprint component vars
//
$card-padding: $g * 3;

$menu-item-border-radius: $pt-border-radius;
$menu-item-line-height: $pt-grid-size * 2;

vendor.scss

In your root Sass file, import your overrides file before importing Blueprint source files. Then import all packages from src/. This will produce a single vendor.css file that contains all the compiled Blueprint styles in one file, from all four libraries below.

For performance reasons, it can be nice to split your external stylesheets to a separate vendor.scss because these will likely change much less frequently than your application styles.

// import your overrides first
@import 'blueprint_variables';

// then each blueprint package from `/src/` NOT `/lib/css/`
@import '~@blueprintjs/core/src/blueprint';
@import '~@blueprintjs/datetime/src/blueprint-datetime';
@import '~@blueprintjs/select/src/blueprint-select';
@import '~@blueprintjs/table/src/table';

put it together

> yarn build:css
yarn run v1.22.4
$ blueprint-sass-compile src/styles
Rendering Complete, saving .css file...
Wrote CSS to /src/styles/application.css
Wrote Source Map to /src/styles/application.css.map
GET https://raw.githubusercontent.com/palantir/blueprint/develop/resources/icons/16px/chevron-right.svg
GET https://raw.githubusercontent.com/palantir/blueprint/develop/resources/icons/16px/more.svg
GET https://raw.githubusercontent.com/palantir/blueprint/develop/resources/icons/16px/small-tick.svg
GET https://raw.githubusercontent.com/palantir/blueprint/develop/resources/icons/16px/small-minus.svg
Rendering Complete, saving .css file...
Wrote CSS to /src/styles/vendor.css
Wrote Source Map to /src/styles/vendor.css.map
Wrote 2 CSS files to /src/styles
✨  Done in 2.82s.

availabe Sass $variables

  • Blueprint $pt-variables: https://github.com/palantir/blueprint/blob/develop/packages/core/src/common/_variables.scss
  • Blueprint colors $blue3, etc: https://github.com/palantir/blueprint/blob/develop/packages/core/src/common/_colors.scss
  • Blueprint color aliases $pt-intent-primary, etc: https://github.com/palantir/blueprint/blob/develop/packages/core/src/common/_color-aliases.scss
  • Component variables (non $pt-* but still editable this way) must be looked up in component source code. They are typically defined in a component's main or _common.scss file: https://github.com/search?l=&q=repo%3Apalantir%2Fblueprint+filename%3A_common.scss&type=Code