Blueprint: is there any way to change basic color intent (primary, success, danger, etc) with choosing color in variables.scss ?

Created on 25 Jul 2019  路  6Comments  路  Source: palantir/blueprint

i used version 3.*
for example intent color primary i see intent "success" color put on $green3 color from variable

i want to change this intent color with $forest3,

is any way to do that ?

thanks before

core question

All 6 comments

You can build blueprint.css yourself using the Blueprint Sass sources distributed in the /src folder in the NPM package. All the variables are set as !default values which you can override. For example, you can change intent color aliases: https://github.com/palantir/blueprint/blob/1bfd1e42303d2626bfc3923eec2195ab4dc696d2/packages/core/src/common/_color-aliases.scss#L4

Instead of using @import "~@blueprintjs/core/lib/css/blueprint.css", you would import "~@blueprintjs/core/src/blueprint.scss" _after_ changing the relevant variables.

its work , but when i hover the button its still take blue color

@renjiza you'll have to adjust more variables, like this one:

https://github.com/palantir/blueprint/blob/1bfd1e42303d2626bfc3923eec2195ab4dc696d2/packages/core/src/components/button/_common.scss#L89

There's no first-class support for doing this kind of theming, so you'll have to dig through the Sass source to figure out all the necessary adjustments.

okay, thank you so much

no first-class support for doing this kind of theming

Damn. There goes where I was headed.

me too

Was this page helpful?
0 / 5 - 0 ratings