VOOZH about

URL: https://www.geeksforgeeks.org/css/bulma-box-variables/

⇱ Bulma Box Variables - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bulma Box Variables

Last Updated : 23 Jul, 2025

Bulma is a free, and open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.

The box element is simply a container with a shadow, a border, a radius, and some padding. We can use this in many places in our project design. It gives an interactive look to our project.

Variables:

NameDescriptionTypeValueComputed ValueComputed Type
$box-colorIt is used to provide color to the box.variable          $texthsl(0, 0%, 29%)color
$box-background-colorIt is used to provide background color to the box.variable$scheme-mainhsl(0, 0%, 100%)color
$box-radiusIt is used to define the radius of the box.variable$radius-large6pxsize
$box-shadowIt is used to define the shadow of the box.variable$shadow0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02)shadow
$box-paddingIt is used to define the padding around the box.size1.25rem
$box-link-hover-shadowIt is used to provide the shadow on the hover effect.shadow0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0 0 1px $link.              
$box-link-active-shadowIt is used to provide shadows to the active links in the box.shadowinset 0 1px 2px rgba($scheme-invert, 0.2), 0 0 0 1px $link

Example 1: This example creates a box container using Bulma and after that modifies the box using the variables.

SCSS Code:

$box-color:green;
.box{
 color:$box-color;
}

Compiled CSS Code:

.box {
 color: green; 
}

Output:

👁 Image
 

Example 2: This example creates a box container using Bulma and after that modifies the box using the variables.

SCSS Code:

$box-background-color:green;
.box{
 background-color:$box-background-color;
}

Compiled CSS Code:

.box {
 background-color: green; 
}

Output:

👁 Image
 

Reference: https://bulma.io/documentation/elements/box/

Comment
Article Tags: