Skip to main content
Bulma provides a comprehensive set of Sass variables that you can customize to match your design system. Variables are organized into two files: initial variables (base values) and derived variables (computed from initial values).

Overview

To customize Bulma, override any variable before importing Bulma:
// Your custom variables
$primary: hsl(171, 100%, 41%);
$family-sans-serif: "Inter", sans-serif;
$radius: 0.5rem;

// Import Bulma
@import "bulma/bulma.scss";

Initial Variables

These are the foundational variables defined in sass/utilities/initial-variables.scss.

Scheme Colors

Base hue and saturation for the color scheme:
VariableDefaultDescription
$scheme-h221Base hue for the color scheme
$scheme-s14%Base saturation for the color scheme
$dark-l20%Lightness for dark colors
$light-l90%Lightness for light colors

Grayscale Colors

Monochrome color palette:
VariableDefaultDescription
$blackhsl(221, 14%, 4%)Darkest shade
$black-bishsl(221, 14%, 9%)Slightly lighter than black
$black-terhsl(221, 14%, 14%)Third black shade
$grey-darkerhsl(221, 14%, 21%)Darkest grey
$grey-darkhsl(221, 14%, 29%)Dark grey
$greyhsl(221, 14%, 48%)Base grey
$grey-lighthsl(221, 14%, 71%)Light grey
$grey-lighterhsl(221, 14%, 86%)Lighter grey
$grey-lightesthsl(221, 14%, 93%)Lightest grey
$white-terhsl(221, 14%, 96%)Third white shade
$white-bishsl(221, 14%, 98%)Slightly darker than white
$whitehsl(221, 14%, 100%)Pure white

Brand Colors

Core color palette:
VariableDefaultDescription
$orangehsl(14, 100%, 53%)Orange accent
$yellowhsl(42, 100%, 53%)Yellow accent
$greenhsl(153, 53%, 53%)Green accent
$turquoisehsl(171, 100%, 41%)Turquoise accent
$cyanhsl(198, 100%, 70%)Cyan accent
$bluehsl(233, 100%, 63%)Blue accent
$purplehsl(271, 100%, 71%)Purple accent
$redhsl(348, 100%, 70%)Red accent
All colors use HSL format for easy customization. Adjust hue, saturation, or lightness to create your brand palette.

Typography

Font families and sizes:
VariableDefaultDescription
$family-sans-serif"Inter", "SF Pro", "Segoe UI", ...Sans-serif font stack
$family-monospace"Inconsolata", "Hack", "SF Mono", ...Monospace font stack
$render-modeoptimizeLegibilityFont rendering mode

Font Sizes

VariableDefaultUsage
$size-13remLargest heading
$size-22.5remLarge heading
$size-32remMedium heading
$size-41.5remSmall heading
$size-51.25remSubtitle
$size-61remBase size
$size-70.75remSmall text

Font Weights

VariableDefaultDescription
$weight-light300Light weight
$weight-normal400Normal weight
$weight-medium500Medium weight
$weight-semibold600Semibold weight
$weight-bold700Bold weight
$weight-extrabold800Extra bold weight

Spacing

VariableDefaultDescription
$block-spacing1.5remVertical spacing between block elements

Responsive Breakpoints

Breakpoint values for responsive design:
VariableDefaultDescription
$gap32pxContainer horizontal gap
$tablet769pxTablet breakpoint
$desktop1024pxDesktop breakpoint (960px + 2 * $gap)
$widescreen1216pxWidescreen breakpoint (1152px + 2 * $gap)
$fullhd1408pxFull HD breakpoint (1344px + 2 * $gap)
$widescreen-enabledtrueEnable widescreen breakpoint
$fullhd-enabledtrueEnable Full HD breakpoint

Miscellaneous

VariableDefaultDescription
$duration294msStandard animation duration
$easingease-outStandard easing function
$radius-small0.25remSmall border radius
$radius0.375remStandard border radius
$radius-medium0.5emMedium border radius
$radius-large0.75remLarge border radius
$radius-rounded9999pxFully rounded borders
$speed86msFast animation speed

Configuration Flags

VariableDefaultDescription
$variable-columnstrueEnable variable width columns
$rtlfalseEnable right-to-left support
$class-prefix""Prefix for CSS classes
$cssvars-prefix"bulma-"Prefix for CSS variables
$helpers-prefix"is-"Prefix for helper classes
$helpers-has-prefix"has-"Prefix for state classes

Derived Variables

These variables are computed from initial variables in sass/utilities/derived-variables.scss.

Scheme Colors

VariableDefaultDescription
$scheme-main$whiteMain background color
$scheme-main-bis$white-bisAlternative background
$scheme-main-ter$white-terTertiary background
$scheme-invert$blackInverted color
$scheme-invert-bis$black-bisAlternative inverted
$scheme-invert-ter$black-terTertiary inverted

Text Colors

VariableDefaultDescription
$text$grey-darkPrimary text color
$text-invertComputedInverted text color
$text-weak$greyWeak text color
$text-strong$grey-darkerStrong text color

Status Colors

VariableDefaultDescription
$primary$turquoisePrimary brand color
$info$cyanInformational color
$success$greenSuccess state color
$warning$yellowWarning state color
$danger$redDanger/error color
$light$white-terLight theme color
$dark$grey-darkerDark theme color
VariableDefaultDescription
$link$blueLink color

Decorative Colors

VariableDefaultDescription
$background$white-terPage background
$border$grey-lighterBorder color
$border-weak$grey-lightestWeak border color

Code Colors

VariableDefaultDescription
$code$redInline code text color
$code-background$backgroundInline code background
$pre$textPre block text color
$pre-background$backgroundPre block background

Typography

VariableDefaultDescription
$family-primary$family-sans-serifPrimary font family
$family-secondary$family-sans-serifSecondary font family
$family-code$family-monospaceCode font family
$size-small$size-7Small size
$size-normal$size-6Normal size
$size-medium$size-5Medium size
$size-large$size-4Large size

Customization Examples

Custom Color Scheme

// Override brand colors
$primary: hsl(204, 86%, 53%);  // Custom blue
$info: hsl(207, 61%, 53%);
$success: hsl(141, 71%, 48%);
$warning: hsl(48, 100%, 67%);
$danger: hsl(348, 100%, 61%);

@import "bulma/bulma.scss";

Custom Typography

// Override font families
$family-sans-serif: "Poppins", sans-serif;
$family-monospace: "Fira Code", monospace;

// Adjust sizes
$size-1: 3.5rem;
$size-2: 2.75rem;
$size-6: 1.125rem;  // Larger base size

@import "bulma/bulma.scss";

Custom Breakpoints

// Adjust responsive breakpoints
$tablet: 640px;
$desktop: 1024px;
$widescreen: 1280px;
$fullhd: 1536px;

@import "bulma/bulma.scss";

Custom Spacing

// Tighter spacing
$block-spacing: 1rem;
$gap: 16px;

// Rounded corners
$radius: 0.5rem;
$radius-large: 1rem;

@import "bulma/bulma.scss";

Custom Color Maps

You can add custom colors to Bulma’s color system:
// Define custom colors
$custom-colors: (
  "orange": ($orange, $white),
  "purple": ($purple, $white),
  "brand": (hsl(180, 50%, 50%), $white)
);

@import "bulma/bulma.scss";
This generates all color variants (light, dark, text) and modifier classes (.is-orange, .has-background-purple, etc.).
All variables use the !default flag, which means they are only set if not already defined. Always define your custom values before importing Bulma.

Build docs developers (and LLMs) love