--- title: Mixins layout: documentation doc-tab: utilities doc-subtab: mixins breadcrumb: - home - documentation - utilities - utilities-mixins ---

Throughout the codebase, Bulma uses Sass mixins to enhance and facilitate the CSS output. While these mixins are mainly used within the context of Bulma, they are of course available for you to re-use in your own projects.

{% include elements/anchor.html name="Element Mixins" %}

Arrow

The arrow() mixin creates a down-facing arrow. The $color parameter defines the color of the arrow.

{% highlight sass %}.bulma-arrow-mixin { @include arrow(purple); }{% endhighlight %} {% capture arrow %} {% endcapture %} {% include elements/snippet.html content=arrow %}

Hamburger

The hamburger() mixin creates a 16x16px set of 3 horizontal bars grouped within square. The dimensions of this square are defined by the $dimensions parameter.

{% highlight sass %}.bulma-hamburger-mixin { @include hamburger(2.5rem); }{% endhighlight %} {% capture hamburger %} {% endcapture %} {% include elements/snippet.html content=hamburger %}

Delete

The delete() mixin creates a 20x20px circle containing a cross. It comes with 3 modifiers: is-small, is-medium and is-large.

{% highlight sass %}.bulma-delete-mixin { @include delete; }{% endhighlight %} {% capture delete %} {% endcapture %} {% include elements/snippet.html content=delete %}

Loader

The loader() mixin creates a 1em spinning circle.

{% highlight sass %}.bulma-loader-mixin { @include loader; }{% endhighlight %} {% capture loader %} {% endcapture %} {% include elements/snippet.html content=loader %}

Block

The block() mixin adds spacing below an element, but only if it's not the last child.
The $spacing parameter defines the value of the margin-bottom.

{% highlight sass %}.bulma-block-mixin { @include block(1rem); }{% endhighlight %} {% capture block %}

This element has a margin-bottom.

This element too.

Not this one because it's the last child.

{% endcapture %} {% include elements/snippet.html content=block %}

Font Awesome container

The fa() mixin creates a square inline-block element, ideal for containing a Font Awesome icon, or any other type of icon font.
The first $size parameter defines the icon font size.
The second $dimensions parameter defines the dimensions of the square container.

{% highlight sass %}.bulma-fa-mixin { @include fa(1rem, 2rem); background-color: lavender; // For demo purposes }{% endhighlight %} {% capture fa %} {% endcapture %} {% include elements/snippet.html content=fa %} @include overlay($offset: 0) @include placeholder // Tools @include clearfix @include center($width, $height: 0) @include overflow-touch @include reset @include unselectable // RTL @include ltr @include rtl @include ltr-property($property, $spacing, $right: true) @include ltr-position($spacing, $right: true)