DEV Community

Cover image for Bulma CSS - Resources and short-introduction
Sm0ke
Sm0ke

Posted on • Updated on

Bulma CSS - Resources and short-introduction

Hello Coders,

In this article, I will present a few resources and basic information about Bulma Css - the open-source CSS framework based on Flexbox.
Bulma is a relatively new entrant to the battleground of CSS frameworks and has made a name for itself in a short time.

Thanks for reading!


Bulma Play

Simple, one-page starter styled with Bulma v0.9.1 released under the MIT license on Github. Being a simple Flask starter, this Bulma-based design can be integrated with ease into any Python-based framework like Django, FastAPI.



Bulma Css - BulmaPlay, open-source starter styled with Bulma.


Bulma Fresh

This is a super simple one-page starter with a hamburger menu and a popup for authentication forms. The UI is crafted by Css Ninja agency and the code can be downloaded directly from Github under the MIT License.



Bulma CSS Fresh - Open-source template project crafted by CSS Ninja


Bulma Krypton

Krypton is a one-page landing page starter built by Css Ninja Studio. Krypton is licensed under the MIT license and based on this permissive license, the UI can be used for unlimited hobby & commercial projects



Bulma CSS Krypton - Open-source multi-page template styled with Bulma.


Flask Dashkit

Admin Dashboard coded in Flask Framework on top of Dashkit Dashboard design (PRO Version) designed by CssNinja.



Bulma Css - Flask Dashkit, premium starter styled with Bulma.


Django Dashkit

Admin Dashboard coded in Django Framework on top of Dashkit Dashboard design (PRO Version) designed by CssNinja.



Bulma Css - Django Dashkit, premium starter styled with Bulma.


Bulma Css

Getting started

Coding a basic web page with Bulma it's quite easy. We need to include the CSS file, available on CDN:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bulma CSS - Starter Page</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"  crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" crossorigin="anonymous" />

</head>
<body>
    <div class="container is-fluid">
        <!-- Add here Bulma Stuff -->
    </div>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Bulma and Font-Awesome are loaded via CDN (no download required):


Bulma Syntax

Modifiers

The first thing you should learn about Bulma is the modifier classes. These allow you to set alternative styles to almost all of the Bulma elements. They all start with is-* or has-*, and then you replace the * with the style you want. For instance, let's add a few styled buttons:

<!DOCTYPE html>
<html>
  <head>
  <body>
  ...
        <p>
            <button class="button">
              Button
            </button>

            <button class="button is-primary">
              Primary button
            </button>

            <button class="button is-large is-warning">
              Large button
            </button>
        </p>
  ...
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

And the result

Bulma CSS - a minimum starter with buttons.


More ... Buttons

The code snippet that code some simple buttons is fairly simple:

<button class="button is-primary is-small">Small</button>
<button class="button is-link">Default</button>
<button class="button is-warning is-normal">Normal</button>
<button class="button is-success is-medium">Medium</button>
<button class="button is-danger  is-large">Large</button>
Enter fullscreen mode Exit fullscreen mode

The output for this code looks like on this screenshot:


Bulma CSS - UI Buttons.


Bulma Responsiveness

Every element in Bulma is mobile-first and optimizes for vertical reading, so by default on mobile and uses 5 breakpoints: mobile (up to 768px), tablet (from 769px), desktop (from 1024px), widescreen: from 1216px

Bulma CSS - Image with the Gid system.


Bulma Colors

To set the color of an element, we need to use the is-* in front of the desired color:

.is-danger
.is-warning
Enter fullscreen mode Exit fullscreen mode

Bulma CSS - Framework Colors.


Bulma - Hero Component

This component can be invoked by using class "hero" as the main container and this will code a full-width banner on the page.


Bulma CSS - UI Hero Component.


Bulma - Team Cards

Using cards for our team or pricing is quite a common component used in many templates. Bulma helps us to code a team section using a minimum CSS code:


Bulma CSS - Team Cards


Let's take a look at the first card and analyze the relevant CSS classes:

<div class="column is-4">
    <div class="level">
        <div class="level-item">
            <figure class="image is-128x128">
                <img class="is-rounded" src="media/team-1.jpg" alt="">
            </figure>
        </div>
    </div>
    <h5 class="title is-5">Angelina Jolie</h5>
    <p class="subtitle is-6">CEO</p>
    <p>When I'm not obsessively stressing ...</p>
</div>
Enter fullscreen mode Exit fullscreen mode
  • The card width has 4 cells (we need three cards on a row)
  • The Image has the figure container and the inner "is-rounded" image
  • The descriptors "is-5" and "is-6" are classes defined for headings objects

Thanks for reading! For more resources, please access:


Btw, my (nick) name is Sm0ke and I'm pretty active also on Twitter.

Top comments (2)

Collapse
 
tazim404 profile image
Tazim Rahbar

Sir how to design navbar in bulma like dev.to.

Collapse
 
9mza profile image
9MZa

Bloomer project now still continue ?