Open In App

Bulma Variable Gap

Bulma Variable Gap class is used to create defined gap between columns, there are 9 modifiers of options in this class. All the classes are mentioned and described below. This class can be used as column width.

Bulma Variable Gap:



Note: This feature is only available in browsers that support CSS Variables.

Example 1: The below example illustrates the Variable gap in Bulma






<!DOCTYPE html>
<html>
  
<head>
    <link rel='stylesheet' 
          href=
</head>
  
<body class="has-text-centered">
    <h1 class="is-size-2 has-text-success">
        GeeksforGeeks
    </h1> <b>Bulma Variable Gap</b>
    <br>
    <section class="section">
        <div class="container">
            <div class="columns">
                <div class="column has-background-success"
                  First column 
                </div>
                <div class="column is-0"></div>
                <div class="column has-background-primary"
                  Second column
                </div>
                <div class="column is-1"></div>
                <div class="column has-background-success"
                  Third column 
                </div>
                <div class="column is-2"></div>
                <div class="column has-background-primary"
                  Fourth column
                </div>
                <div class="column is-3"></div>
            </div>
        </div>
        </section>
</body>
  
</html>

Output:

Example 2:




<!DOCTYPE html>
<html>
  
<head>
    <link rel='stylesheet'
          href=
</head>
  
<body class="has-text-centered">
    <h1 class="is-size-2 has-text-success">
        GeeksforGeeks
    </h1> <b>Bulma Variable Gap</b>
    <br>
    <section class="section">
        <div class="container">
            <div class="columns">
                <div class="column has-background-success"
                  First column </div>
                <div class="column is-1"></div>
                <div class="column has-background-primary"
                  Second column </div>
                <div class="column is-1"></div>
                <div class="column has-background-success"
                  Third column </div>
                <div class="column is-2"></div>
                <div class="column has-background-primary"
                  Fourth column </div>
                <div class="column is-2"></div>
            </div>
        </div>
        </section>
</body>
  
</html>

Output:

Reference: https://bulma.io/documentation/columns/gap/#variable-gap


Article Tags :