What is bulma?
Bulma is a modern CSS framework based on Flexbox. It provides a set of responsive, mobile-first components that are easy to use and customize. Bulma is known for its simplicity and ease of use, making it a popular choice for developers looking to quickly build responsive web interfaces.
What are bulma's main functionalities?
Grid System
Bulma's grid system is based on Flexbox, allowing for easy creation of responsive layouts. The 'columns' class creates a flex container, and each 'column' class creates a flex item.
<div class="columns">
<div class="column">First column</div>
<div class="column">Second column</div>
<div class="column">Third column</div>
<div class="column">Fourth column</div>
</div>
Navigation Bar
Bulma provides a responsive navigation bar component that can be easily customized. The 'navbar' class creates the navigation bar, and 'navbar-item' is used for individual items within the bar.
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img src="https://bulma.io/images/bulma-logo.png" width="112" height="28">
</a>
</div>
<div class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="/">
Home
</a>
<a class="navbar-item" href="/">
Documentation
</a>
</div>
</div>
</nav>
Cards
Bulma's card component is a flexible and extensible content container. It includes options for images, media, and various content sections.
<div class="card">
<div class="card-image">
<figure class="image is-4by3">
<img src="https://bulma.io/images/placeholders/1280x960.png" alt="Placeholder image">
</figure>
</div>
<div class="card-content">
<div class="media">
<div class="media-left">
<figure class="image is-48x48">
<img src="https://bulma.io/images/placeholders/96x96.png" alt="Placeholder image">
</figure>
</div>
<div class="media-content">
<p class="title is-4">John Smith</p>
<p class="subtitle is-6">@johnsmith</p>
</div>
</div>
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
<a>@bulmaio</a>.
<a href="#">#css</a> <a href="#">#responsive</a>
<br>
<time datetime="2016-1-1">11:09 PM - 1 Jan 2016</time>
</div>
</div>
</div>
Other packages similar to bulma
bootstrap
Bootstrap is one of the most popular CSS frameworks. It provides a comprehensive set of components and utilities for building responsive, mobile-first websites. Compared to Bulma, Bootstrap has a larger community and more extensive documentation, but Bulma is often praised for its simplicity and ease of use.
foundation-sites
Foundation is a responsive front-end framework similar to Bulma. It offers a range of components and a flexible grid system. Foundation is known for its advanced features and customization options, making it a good choice for complex projects, whereas Bulma is often preferred for its straightforward approach.
tailwindcss
Tailwind CSS is a utility-first CSS framework that allows for rapid UI development. Unlike Bulma, which provides pre-designed components, Tailwind focuses on low-level utility classes that can be composed to build custom designs. This makes Tailwind highly flexible but requires a different approach to styling compared to Bulma.
Bulma is a modern CSS framework based on Flexbox.
Quick install
Bulma is constantly in development! Try it out now:
NPM
npm install bulma
or
Yarn
yarn add bulma
Bower
bower install bulma
Import
After installation, you can import the CSS file into your project using this snippet:
import 'bulma/css/bulma.css'
CDN
https://cdnjs.com/libraries/bulma
Feel free to raise an issue or submit a pull request.
CSS only
Bulma is a CSS framework. As such, the sole output is a single CSS file: bulma.css
You can either use that file, "out of the box", or download the Sass source files to customize the variables.
There is no JavaScript included. People generally want to use their own JS implementation (and usually already have one). Bulma can be considered "environment agnostic": it's just the style layer on top of the logic.
Browser Support
Bulma uses autoprefixer to make (most) Flexbox features compatible with earlier browser versions. According to Can I use, Bulma is compatible with recent versions of:
- Chrome
- Edge
- Firefox
- Opera
- Safari
Internet Explorer (10+) is only partially supported.
Documentation
The documentation resides in the docs directory, and is built with the Ruby-based Jekyll tool.
Browse the online documentation here.
Related projects
Copyright and license
Code copyright 2018 Jeremy Thomas. Code released under the MIT license.
0.7.0
New features
- New variables
$widescreen-enabled
and $fullhd-enabled
: you can set them to false
to disable each breakpoint - New variables
$control-border-width
and $button-border-width
- 🎉 #1624 Add some common photography aspect ratios and portrait ratios
- 🎉 #1747 New
$custom-colors
and $custom-shades
variable for adding your own colors and shades to Bulma's $colors
and $shades
maps respectively
Improvements
- #1619 Add
$card-header-background-color
, $card-content-background-color
and $card-footer-background-color
to allow different background customization for card elements - #1669 Add
.is-expanded
modifier to .buttons.has-addons
- #1628 Add
.has-background
helpers for block background colors, like .has-text
- #1767 Added minified bundle with cleancss
Bug fixes
- #1778 Fix
is-text-right
precedence over is-text-left-mobile
- #1571 Fix position of delete button on
.tag
- #1549 Implementing a simple version of the native sass percentage function
- #1707 Disable table hover in
.content
by default - #1428 Fix
media-content
overflow
Variable changes
Updated default values
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="3">
File
<code>sass/utilities/initial-variables.sass</code>
</th>
</tr>
<tr>
<th>Variable</th>
<th>From</th>
<th>To</th>
</tr>
<tr>
<td>
<code>$gap</code>
</td>
<td>
<code>32px</code>
</td>
<td>
<code>64px</code>
</td>
</tr>
<tr>
<td>
<code>$radius</code>
</td>
<td>
<code>3px</code>
</td>
<td>
<code>4px</code>
</td>
</tr>
<tr>
<td>
<code>$radius-large</code>
</td>
<td>
<code>5px</code>
</td>
<td>
<code>6px</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="3">
File
<code>sass/base/generic.sass</code>
</th>
</tr>
<tr>
<th>Variable</th>
<th>From</th>
<th>To</th>
</tr>
<tr>
<td>
<code>$hr-background-color</code>
</td>
<td>
<code>$border</code>
</td>
<td>
<code>$background</code>
</td>
</tr>
<tr>
<td>
<code>$hr-height</code>
</td>
<td>
<code>1px</code>
</td>
<td>
<code>2px</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="3">
File
<code>sass/elements/content.sass</code>
</th>
</tr>
<tr>
<th>Variable</th>
<th>From</th>
<th>To</th>
</tr>
<tr>
<td>
<code>$content-heading-weight</code>
</td>
<td>
<code>$weight-normal</code>
</td>
<td>
<code>$weight-semibold</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="3">
File
<code>sass/components/message.sass</code>
</th>
</tr>
<tr>
<th>Variable</th>
<th>From</th>
<th>To</th>
</tr>
<tr>
<td>
<code>$message-header-padding</code>
</td>
<td>
<code>0.5em 0.75em</code>
</td>
<td>
<code>0.75em 1em</code>
</td>
</tr>
<tr>
<td>
<code>$message-body-padding</code>
</td>
<td>
<code>1em 1.25em</code>
</td>
<td>
<code>1.25em 1.5em</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="3">
File
<code>sass/components/navbar.sass</code>
</th>
</tr>
<tr>
<th>Variable</th>
<th>From</th>
<th>To</th>
</tr>
<tr>
<td>
<code>$navbar-item-hover-background-color</code>
</td>
<td>
<code>$background</code>
</td>
<td>
<code>$white-bis</code>
</td>
</tr>
<tr>
<td>
<code>$navbar-dropdown-border-top</code>
</td>
<td>
<code>1px solid $border</code>
</td>
<td>
<code>2px solid $border</code>
</td>
</tr>
<tr>
<td>
<code>$navbar-divider-background-color</code>
</td>
<td>
<code>$border</code>
</td>
<td>
<code>$background</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="3">
File
<code>sass/layout/footer.sass</code>
</th>
</tr>
<tr>
<th>Variable</th>
<th>From</th>
<th>To</th>
</tr>
<tr>
<td>
<code>$footer-background-color</code>
</td>
<td>
<code>$background</code>
</td>
<td>
<code>$white-bis</code>
</td>
</tr>
</tbody>
</table>
New variables
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="2">
File
<code>sass/components/breadcrumb.sass</code>
</th>
</tr>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>
<code>$breadcrumb-item-padding-vertical</code>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr>
<td>
<code>$breadcrumb-item-padding-horizontal</code>
</td>
<td>
<code>0.75em</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="2">
File
<code>sass/components/message.sass</code>
</th>
</tr>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>
<code>$message-body-border-color</code>
</td>
<td>
<code>$border</code>
</td>
</tr>
<tr>
<td>
<code>$message-body-border-width</code>
</td>
<td>
<code>0 0 0 4px</code>
</td>
</tr>
<tr>
<td>
<code>$message-header-weight</code>
</td>
<td>
<code>$weight-bold</code>
</td>
</tr>
<tr>
<td>
<code>$message-header-body-border-width</code>
</td>
<td>
<code>0</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="2">
File
<code>sass/components/navbar.sass</code>
</th>
</tr>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>
<code>$navbar-box-shadow-size</code>
</td>
<td>
<code>0 2px 0 0</code>
</td>
</tr>
<tr>
<td>
<code>$navbar-box-shadow-color</code>
</td>
<td>
<code>$background</code>
</td>
</tr>
<tr>
<td>
<code>$navbar-padding-vertical</code>
</td>
<td>
<code>1rem</code>
</td>
</tr>
<tr>
<td>
<code>$navbar-padding-horizontal</code>
</td>
<td>
<code>2rem</code>
</td>
</tr>
<tr>
<td>
<code>$navbar-z</code>
</td>
<td>
<code>30</code>
</td>
</tr>
</tbody>
</table>
<table class="table is-bordered">
<tbody>
<tr>
<th class="is-light" colspan="2">
File
<code>sass/elements/title.sass</code>
</th>
</tr>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>
<code>$title-line-height</code>
</td>
<td>
<code>1.125</code>
</td>
</tr>
<tr>
<td>
<code>$subtitle-line-height</code>
</td>
<td>
<code>1.25</code>
</td>
</tr>
<tr>
<td>
<code>$subtitle-negative-margin</code>
</td>
<td>
<code>-1.25rem</code>
</td>
</tr>
</tbody>
</table>
Removed variables
<table class="table is-bordered">
<tbody>
<tr>
<th>File</th>
<th>Removed</th>
<th>Replaced with</th>
</tr>
<tr>
<td>
<code>sass/components/message.sass</code>
</td>
<td>
<code>$message-body-border</code>
</td>
<td>
<code>$message-body-border-color</code>
<br>
<code>$message-body-border-width</code>
</td>
</tr>
</tbody>
</table>