VOOZH about

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

⇱ Bulma Panel Variables - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bulma Panel Variables

Last Updated : 5 Aug, 2025

 Bulma is an Open source CSS framework developed by Jeremy Thomas. This framework is based on the CSS Flexbox property. It is highly responsive, minimizing the use of media queries for responsive behavior. Another advantage with Bulma is that you simply need to have an understanding of HTML and CSS to implement this framework (Although knowing JavaScript can help the existing features according to your needs). Bulma also allows us to add our own CSS styling but it is advised to use an external stylesheet over inline styling.

The panel element is simply a container for compact controls. We can use this in many places in the design of the project. It gives an interactive user interface to the project. The panel component includes several other components that we have to add exclusively to design our content nicely. 

Components Used:

  • panel-heading: It is the first child of the panel and is responsible for styling panel heading.
  • panel-tabs: It is responsible for creating panel tabs.
  • panel-block: Panel-block is a kind of container that can contain other elements like input controls, buttons, icons, forms, etc.

Syntax:

$variable-name: property-value;

Table of variables with their type, value, computed value, and computed type are listed below:

       Name                Description               Type           Value                    Computed ValueComputed Type            
$panel-marginThis variable is used to provide spacing.variable$block-spacing1.5remsize
$panel-item-borderThis variable is used to define the border around an element.size1px solid $border-light
$panel-radiusThis variable is used to define the radius around the element.variable$radius-large6pxsize
$panel-shadowThis variable is used to define shadow around the element.variable$shadow0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02)shadow
$panel-heading-background-color This variable is used to define the background color of the header.variable$border-lighthsl(0, 0%, 93%)color
$panel-heading-color This variable is used to define the background color of the header.variable$text-stronghsl(0, 0%, 21%)color
$panel-heading-line-heightThis variable is used to define the height of the line.unitless1.25
$panel-heading-padding This variable is used to provide spacing within the element.size0.75em 1em
$panel-heading-radiusThis variable is used to define the radius around the header.variable$radius4pxsize
$panel-heading-sizeThis variable is used to define the size of the element.size1.25em
$panel-heading-weightThis variable is used to define the weight of the header.variable$weight-bold700font-weight
 
$panel-tabs-font-size This variable is used to define the size of the font.size0.875em
$panel-tab-border-bottomThis variable is used to define the border at bottom of the tab.size1px solid $border
$panel-tab-active-border-bottom-colorThis variable is used to define the border in an active state.variable$link-active-borderhsl(0, 0%, 29%)color
$panel-tab-active-colorThis variable is used to define the color of the tab.variable$link-activehsl(0, 0%, 21%)color
$panel-list-item-colorThis variable is used to define the color of the item.variable$texthsl(0, 0%, 29%)color
$panel-list-item-hover-colorThis variable is used to define color when we hover over the item.variable$linkhsl(229, 53%,  53%)color
$panel-block-colorThis variable is used to define the color of the block.variable$text-stronghsl(0, 0%, 21%)color
$panel-block-hover-background-colorThis variable is used to define the background color on hover.variable$backgroundhsl(0, 0%, 96%)color
$panel-block-active-border-left-colorThis variable is used to define the color on the left side of the border.variable$linkhsl(229, 53%,  53%)color
$panel-block-active-colorThis variable is used to define the color of the block with an active state. variable$link-activehsl(0, 0%, 21%)color
$panel-block-active-icon-colorThis variable is used to provide icons to the panel.variable$linkhsl(229, 53%,  53%)color
$panel-icon-colorThis variable is used to define the color of the panel.variable$text-lighthsl(0, 0%, 48%)color
$panel-colorsThis variable is used to define the color of the panel.variable$colorsBulma colorsmap

Example 1: In the below code, we will make use of the above variables to demonstrate the use of the panel in the webpage. The variable used in this case is $panel-block-active-color.

SCSS code:

$panel-block-active-color:green;
.panel-heading {
 background-color:$panel-block-active-color;
}

Compiled CSS code:

.panel-heading {
 background-color: green; 
}

Output:

👁 Image
 

Example 2: In the below code we will make use of the above variables to demonstrate the use of the panel in the webpage. The variable used in this case is $panel-list-item-color.

SCSS code:

$panel-list-item-color:hsl(0, 0%, 29%);
.panel-block{
 background-color:$panel-list-item-color;
}

Compiled CSS code:

.panel-block {
 background-color: #4a4a4a; 
}

Output:

👁 Image
 

Reference: https://bulma.io/documentation/components/panel/

Comment