Custom themes and styles for Palantir's Blueprint js React component library
Blueprint Styler is a tool that allows users to create custom global styles for Blueprint.js components using CSS custom properties, also known as “Tokens”. By overriding the default Blueprint global CSS, users can have more control over the styling of the components. There are two ways to create a custom theme: integrating Blueprint Styler into an existing project or creating a new theme within the Blueprint Styler project itself.
npm install blueprint-styleryarn add blueprint-styler./base/blueprint.css and ./base/blueprint-tokens.css../overrides/{style_name}/override.css and ./overrides/{style_name}/override-tokens.css.:root selector and override the --custom-properties from blueprint-tokens.css.blueprint.css for additional control._example folder in ./src/styles._example folder must contain:index.scss, which will compile into the overrides/example/override.css and overrides/example/override-tokens.css files. This file must also set the $ns (namespace) and !default $root-selector variables.styler-styles.scss that extends index.scss to style the demo React app components. This file must reset the $root-selector to scope the style to an app’s theme switching method.src/styles/style-manifest.ts file, following the pattern of other themes.#{$root-selector} {...} block to scope it accordingly../src/styles/_blueprint/common/ and ./src/styles/_blueprint/components/, and change the values to override them.yarn start, accessing http://localhost:9000/, and selecting the theme from the style dropdown.Blueprint Styler is a versatile tool that allows users to create custom global styles for Blueprint.js components. By utilizing CSS custom properties and overrides, users can have full control over the styling of these components. With the option to integrate into an existing project or create a new theme within the Blueprint Styler project, users have flexibility in how they implement and test their custom styling. The provided demo app and utility SCSS files further enhance the customization capabilities of Blueprint Styler.