Parcourir la source

More snippets

Jeremy Thomas il y a 7 ans
Parent
commit
695c72c6a9

+ 1 - 0
docs/_includes/snippet.html

@@ -1,6 +1,7 @@
 <div class="
   bd-snippet
   {% if include.horizontal %}bd-is-horizontal{% else %}bd-is-vertical{% endif %}
+  {% if include.clipped %}bd-is-clipped{% endif %}
   {% if include.size %}bd-is-{{ include.size }}{% endif %}
   ">
   <div class="bd-snippet-preview">

+ 7 - 0
docs/_sass/example.sass

@@ -58,6 +58,10 @@
 .bd-snippet-code
   background-color: $pre-background
 
+.bd-snippet.bd-is-clipped
+  .bd-snippet-code
+    overflow: auto
+
 +desktop
   .bd-snippet.bd-is-vertical
     align-items: stretch
@@ -161,6 +165,9 @@ $structure-invert: $danger-invert
     &:hover
       background-color: $yellow
       color: $yellow-invert
+    &:focus,
+    &:active
+      box-shadow: none
   .bd-expand
     right: 45px
   +tablet

+ 82 - 0
docs/css/bulma-docs.css

@@ -2537,46 +2537,118 @@ a.box:active {
   border-color: white;
 }
 
+.input.is-white:focus, .input.is-white.is-focused, .input.is-white:active, .input.is-white.is-active,
+.textarea.is-white:focus,
+.textarea.is-white.is-focused,
+.textarea.is-white:active,
+.textarea.is-white.is-active {
+  box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25);
+}
+
 .input.is-black,
 .textarea.is-black {
   border-color: #0a0a0a;
 }
 
+.input.is-black:focus, .input.is-black.is-focused, .input.is-black:active, .input.is-black.is-active,
+.textarea.is-black:focus,
+.textarea.is-black.is-focused,
+.textarea.is-black:active,
+.textarea.is-black.is-active {
+  box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25);
+}
+
 .input.is-light,
 .textarea.is-light {
   border-color: whitesmoke;
 }
 
+.input.is-light:focus, .input.is-light.is-focused, .input.is-light:active, .input.is-light.is-active,
+.textarea.is-light:focus,
+.textarea.is-light.is-focused,
+.textarea.is-light:active,
+.textarea.is-light.is-active {
+  box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25);
+}
+
 .input.is-dark,
 .textarea.is-dark {
   border-color: #363636;
 }
 
+.input.is-dark:focus, .input.is-dark.is-focused, .input.is-dark:active, .input.is-dark.is-active,
+.textarea.is-dark:focus,
+.textarea.is-dark.is-focused,
+.textarea.is-dark:active,
+.textarea.is-dark.is-active {
+  box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25);
+}
+
 .input.is-primary,
 .textarea.is-primary {
   border-color: #00d1b2;
 }
 
+.input.is-primary:focus, .input.is-primary.is-focused, .input.is-primary:active, .input.is-primary.is-active,
+.textarea.is-primary:focus,
+.textarea.is-primary.is-focused,
+.textarea.is-primary:active,
+.textarea.is-primary.is-active {
+  box-shadow: 0 0 0 0.125em rgba(0, 209, 178, 0.25);
+}
+
 .input.is-info,
 .textarea.is-info {
   border-color: #3273dc;
 }
 
+.input.is-info:focus, .input.is-info.is-focused, .input.is-info:active, .input.is-info.is-active,
+.textarea.is-info:focus,
+.textarea.is-info.is-focused,
+.textarea.is-info:active,
+.textarea.is-info.is-active {
+  box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
+}
+
 .input.is-success,
 .textarea.is-success {
   border-color: #23d160;
 }
 
+.input.is-success:focus, .input.is-success.is-focused, .input.is-success:active, .input.is-success.is-active,
+.textarea.is-success:focus,
+.textarea.is-success.is-focused,
+.textarea.is-success:active,
+.textarea.is-success.is-active {
+  box-shadow: 0 0 0 0.125em rgba(35, 209, 96, 0.25);
+}
+
 .input.is-warning,
 .textarea.is-warning {
   border-color: #ffdd57;
 }
 
+.input.is-warning:focus, .input.is-warning.is-focused, .input.is-warning:active, .input.is-warning.is-active,
+.textarea.is-warning:focus,
+.textarea.is-warning.is-focused,
+.textarea.is-warning:active,
+.textarea.is-warning.is-active {
+  box-shadow: 0 0 0 0.125em rgba(255, 221, 87, 0.25);
+}
+
 .input.is-danger,
 .textarea.is-danger {
   border-color: #ff3860;
 }
 
+.input.is-danger:focus, .input.is-danger.is-focused, .input.is-danger:active, .input.is-danger.is-active,
+.textarea.is-danger:focus,
+.textarea.is-danger.is-focused,
+.textarea.is-danger:active,
+.textarea.is-danger.is-active {
+  box-shadow: 0 0 0 0.125em rgba(255, 56, 96, 0.25);
+}
+
 .input.is-small,
 .textarea.is-small {
   border-radius: 2px;
@@ -9634,6 +9706,10 @@ html.route-index #carbon {
   background-color: whitesmoke;
 }
 
+.bd-snippet.bd-is-clipped .bd-snippet-code {
+  overflow: auto;
+}
+
 @media screen and (min-width: 1008px) {
   .bd-snippet.bd-is-vertical {
     align-items: stretch;
@@ -9773,6 +9849,12 @@ html.route-index #carbon {
   color: rgba(0, 0, 0, 0.7);
 }
 
+.highlight .bd-copy:focus, .highlight .bd-copy:active,
+.highlight .bd-expand:focus,
+.highlight .bd-expand:active {
+  box-shadow: none;
+}
+
 .highlight .bd-expand {
   right: 45px;
 }

+ 14 - 42
docs/documentation/components/breadcrumb.html

@@ -160,75 +160,53 @@ variables:
     </div>
 
     <hr>
-    <div class="bd-example">
-      {{breadcrumb_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_example}}{% endhighlight %}
 
-    <hr>
+    {% include anchor.html name="Alignment" %}
 
-    <h3 class="title">Alignment</h3>
     <div class="content">
       <p>For alternative alignments, use the <code>is-centered</code> and <code>is-right</code> modifiers on the <code>.breadcrumb</code> container.</p>
     </div>
 
-
-    <div class="bd-example">
-      {{breadcrumb_centered_example}}
-    </div>
-
+    {% include snippet.html content=breadcrumb_centered_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_centered_example}}{% endhighlight %}
 
-    <div class="bd-example">
-      {{breadcrumb_right_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_right_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_right_example}}{% endhighlight %}
 
-    <hr>
-
-    <h3 class="title">Icons</h3>
+    {% include anchor.html name="Icons" %}
 
     <div class="content">
       <p>You can use any of the <a href="http://fortawesome.github.io/Font-Awesome/">Font Awesome</a> <strong>icons</strong>.</p>
     </div>
 
-    <div class="bd-example">
-      {{breadcrumb_icons_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_icons_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_icons_example}}{% endhighlight %}
 
-    <hr>
+    {% include anchor.html name="Alternative separators" %}
 
-    <h3 class="title">Alternative separators</h3>
     <div class="content">
       <p>You can choose between <strong>4 additional separators</strong>: <code>has-arrow-separator</code> <code>has-bullet-separator</code> <code>has-dot-separator</code> and <code>has-succeeds-separator</code>.</p>
     </div>
 
-    <div class="bd-example">
-      {{breadcrumb_arrow_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_arrow_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_arrow_example}}{% endhighlight %}
 
-    <div class="bd-example">
-      {{breadcrumb_bullet_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_bullet_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_bullet_example}}{% endhighlight %}
 
-    <div class="bd-example">
-      {{breadcrumb_dot_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_dot_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_dot_example}}{% endhighlight %}
 
-    <div class="bd-example">
-      {{breadcrumb_succeeds_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_succeeds_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_succeeds_example}}{% endhighlight %}
 
@@ -238,21 +216,15 @@ variables:
       <p>You can choose between <strong>3 additional sizes</strong>: <code>is-small</code> <code>is-medium</code> and <code>is-large</code>.</p>
     </div>
 
-    <div class="bd-example">
-      {{breadcrumb_small_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_small_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_small_example}}{% endhighlight %}
 
-    <div class="bd-example">
-      {{breadcrumb_medium_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_medium_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_medium_example}}{% endhighlight %}
 
-    <div class="bd-example">
-      {{breadcrumb_large_example}}
-    </div>
+    {% include snippet.html content=breadcrumb_large_example horizontal=true clipped=true %}
 
     {% highlight html %}{{breadcrumb_large_example}}{% endhighlight %}
 

+ 0 - 228
docs/documentation/components/level.html

@@ -5,231 +5,3 @@ doc-subtab: level
 ---
 
 <meta http-equiv="refresh" content="0; url={{ site.url }}/documentation/layout/level/">
-
-{% include subnav-components.html %}
-
-<section class="section">
-  <div class="container">
-    <h1 class="title">Level</h1>
-    <h2 class="subtitle">A multi-purpose <strong>horizontal level</strong>, which can contain almost any other element</h2>
-    {%
-      include meta.html
-      colors=false
-      sizes=false
-      variables=false
-    %}
-
-    <hr>
-
-    <div class="content">
-      <p>The <strong>structure</strong> of a level is the following:</p>
-      <ul>
-        <li>
-          <code>level</code>: main container
-          <ul>
-            <li><code>level-left</code> for the left side. This element is <em>required</em>, even if it is empty</li>
-            <li>
-              <code>level-right</code> for the right side
-              <ul>
-                <li><code>level-item</code> for each individual element</li>
-              </ul>
-            </li>
-          </ul>
-        </li>
-      </ul>
-      <p>In a <code>level-item</code>, you can then insert almost <em>anything</em> you want: a title, a button, a text input, or just simple text. No matter what elements you put inside a Bulma <code>level</code>, they will always be <strong>vertically centered</strong>.</p>
-    </div>
-
-    <div class="bd-structure">
-      <nav class="level bd-structure-item bd-is-structure-container" title="level">
-        <div class="level-left bd-structure-item" title="level-left">
-          <div class="level-item">
-            <p class="subtitle is-5">
-              <strong>123</strong> posts
-            </p>
-          </div>
-          <div class="level-item">
-            <div class="field has-addons">
-              <p class="control">
-                <input class="input" type="text" placeholder="Find a post">
-              </p>
-              <p class="control">
-                <button class="button">
-                  Search
-                </button>
-              </p>
-            </div>
-          </div>
-        </div>
-        <div class="level-right bd-structure-item" title="level-right">
-          <p class="level-item">
-            <strong>All</strong>
-          </p>
-          <p class="level-item">
-            <a>Published</a>
-          </p>
-          <p class="level-item">
-            <a>Drafts</a>
-          </p>
-          <p class="level-item">
-            <a>Deleted</a>
-          </p>
-          <p class="level-item">
-            <a class="button is-success">
-              New
-            </a>
-          </p>
-        </div>
-      </nav>
-    </div>
-
-{% capture nav_example %}
-<!-- Main container -->
-<nav class="level">
-  <!-- Left side -->
-  <div class="level-left">
-    <div class="level-item">
-      <p class="subtitle is-5">
-        <strong>123</strong> posts
-      </p>
-    </div>
-    <div class="level-item">
-      <div class="field has-addons">
-        <p class="control">
-          <input class="input" type="text" placeholder="Find a post">
-        </p>
-        <p class="control">
-          <button class="button">
-            Search
-          </button>
-        </p>
-      </div>
-    </div>
-  </div>
-
-  <!-- Right side -->
-  <div class="level-right">
-    <p class="level-item"><strong>All</strong></p>
-    <p class="level-item"><a>Published</a></p>
-    <p class="level-item"><a>Drafts</a></p>
-    <p class="level-item"><a>Deleted</a></p>
-    <p class="level-item"><a class="button is-success">New</a></p>
-  </div>
-</nav>
-{% endcapture %}
-<div class="bd-example">
-{{nav_example}}
-</div>
-{% highlight html %}
-{{nav_example}}
-{% endhighlight %}
-
-    <hr>
-
-<h3 class="title">Centered level</h3>
-<div class="content">
-  If you want a <strong>centered level</strong>, you can use as many <code>level-item</code> as you want, as long as they are <strong>direct</strong> children of the <code>level</code> container.
-</div>
-{% capture nav_centered_example %}
-<nav class="level">
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Tweets</p>
-      <p class="title">3,456</p>
-    </div>
-  </div>
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Following</p>
-      <p class="title">123</p>
-    </div>
-  </div>
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Followers</p>
-      <p class="title">456K</p>
-    </div>
-  </div>
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Likes</p>
-      <p class="title">789</p>
-    </div>
-  </div>
-</nav>
-{% endcapture %}
-{% capture nav_centered_bis_example %}
-<nav class="level">
-  <p class="level-item has-text-centered">
-    <a class="link is-info">Home</a>
-  </p>
-  <p class="level-item has-text-centered">
-    <a class="link is-info">Menu</a>
-  </p>
-  <p class="level-item has-text-centered">
-    <img src="{{ site.url }}/images/bulma-type.png" alt="" style="height: 30px;">
-  </p>
-  <p class="level-item has-text-centered">
-    <a class="link is-info">Reservations</a>
-  </p>
-  <p class="level-item has-text-centered">
-    <a class="link is-info">Contact</a>
-  </p>
-</nav>
-{% endcapture %}
-<div class="bd-example">
-{{nav_centered_example}}
-</div>
-{% highlight html %}
-{{nav_centered_example}}
-{% endhighlight %}
-<div class="bd-example">
-{{nav_centered_bis_example}}
-</div>
-{% highlight html %}
-{{nav_centered_bis_example}}
-{% endhighlight %}
-
-    <hr>
-
-<h3 class="title">Mobile level</h3>
-<div class="content">
-  By default, for space concerns, the level is vertical on mobile. If you want the level to be horizontal on mobile as well, add the <code>is-mobile</code> modifier on the <code>level</code> container.
-</div>
-{% capture nav_mobile_example %}
-<nav class="level is-mobile">
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Tweets</p>
-      <p class="title">3,456</p>
-    </div>
-  </div>
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Following</p>
-      <p class="title">123</p>
-    </div>
-  </div>
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Followers</p>
-      <p class="title">456K</p>
-    </div>
-  </div>
-  <div class="level-item has-text-centered">
-    <div>
-      <p class="heading">Likes</p>
-      <p class="title">789</p>
-    </div>
-  </div>
-</nav>
-{% endcapture %}
-<div class="bd-example">
-{{nav_mobile_example}}
-</div>
-{% highlight html %}
-{{nav_mobile_example}}
-{% endhighlight %}
-
-  </div>
-</section>

+ 0 - 237
docs/documentation/components/media-object.html

@@ -5,240 +5,3 @@ doc-subtab: media-object
 ---
 
 <meta http-equiv="refresh" content="0; url={{ site.url }}/documentation/layout/media-object/">
-
-{% include subnav-components.html %}
-
-<section class="section">
-  <div class="container">
-    <h1 class="title">Media Object</h1>
-    <h2 class="subtitle">The famous <strong>media object</strong> prevalent in social media interfaces, but useful in any context</h2>
-    {%
-      include meta.html
-      colors=false
-      sizes=false
-      variables=false
-    %}
-
-    <hr>
-
-    <div class="content">
-      <p>The <a href="http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code">media object</a> is a UI element perfect for repeatable and nestable content.</p>
-    </div>
-
-    <div class="bd-structure">
-      <article class="media">
-        <figure class="media-left bd-structure-item" title="media-left">
-          <p class="image is-64x64">
-            <img src="{{site.url}}/images/placeholders/128x128.png">
-          </p>
-        </figure>
-        <div class="media-content bd-structure-item bd-is-structure-right" title="media-content">
-          <div class="content">
-            <p>
-              <strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
-              <br>
-              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.
-            </p>
-          </div>
-          <nav class="level">
-            <div class="level-left">
-              <a class="level-item">
-                <span class="icon is-small"><i class="fa fa-reply"></i></span>
-              </a>
-              <a class="level-item">
-                <span class="icon is-small"><i class="fa fa-retweet"></i></span>
-              </a>
-              <a class="level-item">
-                <span class="icon is-small"><i class="fa fa-heart"></i></span>
-              </a>
-            </div>
-          </nav>
-        </div>
-        <div class="media-right bd-structure-item" title="media-right">
-          <button class="delete"></button>
-        </div>
-      </article>
-    </div>
-
-{% capture media_example %}
-<article class="media">
-  <figure class="media-left">
-    <p class="image is-64x64">
-      <img src="{{site.url}}/images/placeholders/128x128.png">
-    </p>
-  </figure>
-  <div class="media-content">
-    <div class="content">
-      <p>
-        <strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
-        <br>
-        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.
-      </p>
-    </div>
-    <nav class="level is-mobile">
-      <div class="level-left">
-        <a class="level-item">
-          <span class="icon is-small"><i class="fa fa-reply"></i></span>
-        </a>
-        <a class="level-item">
-          <span class="icon is-small"><i class="fa fa-retweet"></i></span>
-        </a>
-        <a class="level-item">
-          <span class="icon is-small"><i class="fa fa-heart"></i></span>
-        </a>
-      </div>
-    </nav>
-  </div>
-  <div class="media-right">
-    <button class="delete"></button>
-  </div>
-</article>
-{% endcapture %}
-<div class="bd-example">
-{{media_example}}
-</div>
-{% highlight html %}
-{{media_example}}
-{% endhighlight %}
-
-    <div class="content">
-      <p>You can include <em>any</em> other Bulma element, like inputs, textareas, icons, buttons... or even a <strong>nav bar</strong>.</p>
-    </div>
-
-{% capture media_bis_example %}
-<article class="media">
-  <figure class="media-left">
-    <p class="image is-64x64">
-      <img src="{{site.url}}/images/placeholders/128x128.png">
-    </p>
-  </figure>
-  <div class="media-content">
-    <div class="field">
-      <p class="control">
-        <textarea class="textarea" placeholder="Add a comment..."></textarea>
-      </p>
-    </div>
-    <nav class="level">
-      <div class="level-left">
-        <div class="level-item">
-          <a class="button is-info">Submit</a>
-        </div>
-      </div>
-      <div class="level-right">
-        <div class="level-item">
-          <label class="checkbox">
-            <input type="checkbox"> Press enter to submit
-          </label>
-        </div>
-      </div>
-    </nav>
-  </div>
-</article>
-{% endcapture %}
-<div class="bd-example">
-{{media_bis_example}}
-</div>
-{% highlight html %}
-{{media_bis_example}}
-{% endhighlight %}
-
-    <hr>
-
-    <h3 class="title">Nesting</h3>
-    <div class="content">
-      <p>You can nest media objects up to <strong>3 levels</strong> deep.</p>
-    </div>
-{% capture media_nested_example %}
-<article class="media">
-  <figure class="media-left">
-    <p class="image is-64x64">
-      <img src="{{site.url}}/images/placeholders/128x128.png">
-    </p>
-  </figure>
-  <div class="media-content">
-    <div class="content">
-      <p>
-        <strong>Barbara Middleton</strong>
-        <br>
-        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porta eros lacus, nec ultricies elit blandit non. Suspendisse pellentesque mauris sit amet dolor blandit rutrum. Nunc in tempus turpis.
-        <br>
-        <small><a>Like</a> · <a>Reply</a> · 3 hrs</small>
-      </p>
-    </div>
-
-    <article class="media">
-      <figure class="media-left">
-        <p class="image is-48x48">
-          <img src="{{site.url}}/images/placeholders/96x96.png">
-        </p>
-      </figure>
-      <div class="media-content">
-        <div class="content">
-          <p>
-            <strong>Sean Brown</strong>
-            <br>
-            Donec sollicitudin urna eget eros malesuada sagittis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit nisl a nulla sagittis, a lobortis leo feugiat.
-            <br>
-            <small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
-          </p>
-        </div>
-
-        <article class="media">
-          Vivamus quis semper metus, non tincidunt dolor. Vivamus in mi eu lorem cursus ullamcorper sit amet nec massa.
-        </article>
-
-        <article class="media">
-          Morbi vitae diam et purus tincidunt porttitor vel vitae augue. Praesent malesuada metus sed pharetra euismod. Cras tellus odio, tincidunt iaculis diam non, porta aliquet tortor.
-        </article>
-      </div>
-    </article>
-
-    <article class="media">
-      <figure class="media-left">
-        <p class="image is-48x48">
-          <img src="{{site.url}}/images/placeholders/96x96.png">
-        </p>
-      </figure>
-      <div class="media-content">
-        <div class="content">
-          <p>
-            <strong>Kayli Eunice </strong>
-            <br>
-            Sed convallis scelerisque mauris, non pulvinar nunc mattis vel. Maecenas varius felis sit amet magna vestibulum euismod malesuada cursus libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus lacinia non nisl id feugiat.
-            <br>
-            <small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
-          </p>
-        </div>
-      </div>
-    </article>
-  </div>
-</article>
-<article class="media">
-  <figure class="media-left">
-    <p class="image is-64x64">
-      <img src="{{site.url}}/images/placeholders/128x128.png">
-    </p>
-  </figure>
-  <div class="media-content">
-    <div class="field">
-      <p class="control">
-        <textarea class="textarea" placeholder="Add a comment..."></textarea>
-      </p>
-    </div>
-    <div class="field">
-      <p class="control">
-        <button class="button">Post comment</button>
-      </p>
-    </div>
-  </div>
-</article>
-{% endcapture %}
-<div class="bd-example">
-{{media_nested_example}}
-</div>
-{% highlight html %}
-{{media_nested_example}}
-{% endhighlight %}
-
-  </div>
-</section>

+ 7 - 29
docs/documentation/components/pagination.html

@@ -209,11 +209,7 @@ variables:
       </p>
     </div>
 
-    <div class="bd-example">
-      {{pagination_example}}
-    </div>
-
-    {% highlight html %}{{pagination_example}}{% endhighlight %}
+    {% include snippet.html content=pagination_example horizontal=true clipped=true %}
 
     <div class="content">
       <p>
@@ -221,11 +217,7 @@ variables:
       </p>
     </div>
 
-    <div class="bd-example">
-      {{pagination_options_example}}
-    </div>
-
-    {% highlight html %}{{pagination_options_example}}{% endhighlight %}
+    {% include snippet.html content=pagination_options_example horizontal=true clipped=true %}
 
     <div class="content">
       <p>
@@ -233,17 +225,9 @@ variables:
       </p>
     </div>
 
-    <div class="bd-example">
-      {{pagination_centered_example}}
-    </div>
+    {% include snippet.html content=pagination_centered_example horizontal=true clipped=true %}
 
-    {% highlight html %}{{pagination_centered_example}}{% endhighlight %}
-
-    <div class="bd-example">
-      {{pagination_right_example}}
-    </div>
-
-    {% highlight html %}{{pagination_right_example}}{% endhighlight %}
+    {% include snippet.html content=pagination_right_example horizontal=true clipped=true %}
 
     {% include anchor.html name="Sizes" %}
 
@@ -252,17 +236,11 @@ variables:
       You only need to append the <strong>modifier</strong> <code>is-small</code>, <code>is-medium</code>, or <code>is-large</code> to the <code>pagination</code> component.
     </p>
 
-    <div class="bd-example">
-      {{pagination_small_example}}
-    </div>
+    {% include snippet.html content=pagination_small_example horizontal=true clipped=true %}
 
-    <div class="bd-example">
-      {{pagination_medium_example}}
-    </div>
+    {% include snippet.html content=pagination_medium_example horizontal=true clipped=true %}
 
-    <div class="bd-example">
-      {{pagination_large_example}}
-    </div>
+    {% include snippet.html content=pagination_large_example horizontal=true clipped=true %}
 
     {% include variables.html %}
 

+ 0 - 1205
docs/documentation/elements/form.html

@@ -6,1208 +6,3 @@ doc-subtab: form
 ---
 
 <meta http-equiv="refresh" content="0; url={{ site.url }}/documentation/form/general/">
-
-{% capture form_example %}
-<div class="field">
-  <label class="label">Name</label>
-  <p class="control">
-    <input class="input" type="text" placeholder="Text input">
-  </p>
-</div>
-
-<div class="field">
-  <label class="label">Username</label>
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-success" type="text" placeholder="Text input" value="bulma">
-    <span class="icon is-small is-left">
-      <i class="fa fa-user"></i>
-    </span>
-    <span class="icon is-small is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-  <p class="help is-success">This username is available</p>
-</div>
-
-<div class="field">
-  <label class="label">Email</label>
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-danger" type="text" placeholder="Email input" value="hello@">
-    <span class="icon is-small is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-small is-right">
-      <i class="fa fa-warning"></i>
-    </span>
-  </p>
-  <p class="help is-danger">This email is invalid</p>
-</div>
-
-<div class="field">
-  <label class="label">Subject</label>
-  <p class="control">
-    <span class="select">
-      <select>
-        <option>Select dropdown</option>
-        <option>With options</option>
-      </select>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <label class="label">Message</label>
-  <p class="control">
-    <textarea class="textarea" placeholder="Textarea"></textarea>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control">
-    <label class="checkbox">
-      <input type="checkbox">
-      I agree to the <a href="#">terms and conditions</a>
-    </label>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control">
-    <label class="radio">
-      <input type="radio" name="question">
-      Yes
-    </label>
-    <label class="radio">
-      <input type="radio" name="question">
-      No
-    </label>
-  </p>
-</div>
-
-<div class="field is-grouped">
-  <p class="control">
-    <button class="button is-primary">Submit</button>
-  </p>
-  <p class="control">
-    <button class="button is-link">Cancel</button>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture colors_example %}
-<div class="field">
-  <p class="control">
-    <input class="input is-primary" type="text" placeholder="Primary input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input is-info" type="text" placeholder="Info input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input is-success" type="text" placeholder="Success input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input is-warning" type="text" placeholder="Warning input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input is-danger" type="text" placeholder="Danger input">
-  </p>
-</div>
-{% endcapture %}
-
-{% capture sizes_example %}
-<div class="field">
-  <p class="control">
-    <input class="input is-small" type="text" placeholder="Small input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input" type="text" placeholder="Normal input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input is-medium" type="text" placeholder="Medium input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <input class="input is-large" type="text" placeholder="Large input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <span class="select is-small">
-      <select>
-        <option>Select dropdown</option>
-        <option>With options</option>
-      </select>
-    </span>
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <span class="select">
-      <select>
-        <option>Select dropdown</option>
-        <option>With options</option>
-      </select>
-    </span>
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <span class="select is-medium">
-      <select>
-        <option>Select dropdown</option>
-        <option>With options</option>
-      </select>
-    </span>
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <span class="select is-large">
-      <select>
-        <option>Select dropdown</option>
-        <option>With options</option>
-      </select>
-    </span>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture normal_example %}
-<div class="field">
-  <p class="control">
-    <input class="input" type="text" placeholder="Normal input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <textarea class="textarea" placeholder="Normal textarea"></textarea>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture hover_example %}
-<div class="field">
-  <p class="control">
-    <input class="input is-hovered" type="text" placeholder="Hovered input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <textarea class="textarea is-hovered" placeholder="Hovered textarea"></textarea>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture focus_example %}
-<div class="field">
-  <p class="control">
-    <input class="input is-focused" type="text" placeholder="Focused input">
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <textarea class="textarea is-focused" placeholder="Focused textarea"></textarea>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture loading_example %}
-<div class="field">
-  <p class="control is-loading">
-    <input class="input" type="text" placeholder="Loading input">
-  </p>
-</div>
-<div class="field">
-  <div class="control">
-    <div class="select is-loading">
-      <select>
-        <option>Loading dropdown</option>
-      </select>
-    </div>
-  </div>
-</div>
-<div class="field">
-  <p class="control is-loading">
-    <textarea class="textarea" placeholder="Loading textarea"></textarea>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture loading_sizes_example %}
-<div class="field">
-  <p class="control is-small is-loading">
-    <input class="input is-small" type="text" placeholder="Small loading input">
-  </p>
-</div>
-<div class="field">
-  <p class="control is-loading">
-    <input class="input" type="text" placeholder="Normal loading input">
-  </p>
-</div>
-<div class="field">
-  <p class="control is-medium is-loading">
-    <input class="input is-medium" type="text" placeholder="Medium loading input">
-  </p>
-</div>
-<div class="field">
-  <p class="control is-large is-loading">
-    <input class="input is-large" type="text" placeholder="Large loading input">
-  </p>
-</div>
-<div class="field">
-  <div class="control">
-    <div class="select is-small is-loading">
-      <select>
-        <option>Small loading dropdown</option>
-      </select>
-    </div>
-  </div>
-</div>
-<div class="field">
-  <div class="control">
-    <div class="select is-loading">
-      <select>
-        <option>Normal loading dropdown</option>
-      </select>
-    </div>
-  </div>
-</div>
-<div class="field">
-  <div class="control">
-    <div class="select is-medium is-loading">
-      <select>
-        <option>Medium loading dropdown</option>
-      </select>
-    </div>
-  </div>
-</div>
-<div class="field">
-  <div class="control">
-    <div class="select is-large is-loading">
-      <select>
-        <option>Large loading dropdown</option>
-      </select>
-    </div>
-  </div>
-</div>
-{% endcapture %}
-
-{% capture disabled_example %}
-<div class="field">
-  <p class="control">
-    <input class="input" type="text" placeholder="Disabled input" disabled>
-  </p>
-</div>
-<div class="field">
-  <div class="control">
-    <div class="select is-disabled">
-      <select disabled>
-        <option>Disabled dropdown</option>
-      </select>
-    </div>
-  </div>
-</div>
-<div class="field">
-  <p class="control">
-    <textarea class="textarea" placeholder="Disabled textarea" disabled></textarea>
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <label class="checkbox" disabled>
-      <input type="checkbox" disabled>
-      Remember me
-    </label>
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <label class="radio" disabled>
-      <input type="radio" name="question" disabled>
-      Yes
-    </label>
-    <label class="radio" disabled>
-      <input type="radio" name="question" disabled>
-      No
-    </label>
-  </p>
-</div>
-<div class="field is-grouped">
-  <p class="control">
-    <button class="button is-primary" disabled>Submit</button>
-  </p>
-  <p class="control">
-    <button class="button" disabled>Cancel</button>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture icons_example %}
-<div class="field">
-  <p class="control has-icons-left">
-    <input class="input" type="email" placeholder="Email">
-    <span class="icon is-small is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-  </p>
-</div>
-<div class="field">
-  <p class="control has-icons-left">
-    <input class="input" type="password" placeholder="Password">
-    <span class="icon is-small is-left">
-      <i class="fa fa-lock"></i>
-    </span>
-  </p>
-</div>
-<div class="field">
-  <p class="control">
-    <button class="button is-success">
-      Login
-    </button>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture select_icons_example %}
-<div class="field">
-  <p class="control has-icons-left">
-    <span class="select">
-      <select>
-        <option selected>Country</option>
-        <option>Select dropdown</option>
-        <option>With options</option>
-      </select>
-    </span>
-    <span class="icon is-small is-left">
-      <i class="fa fa-globe"></i>
-    </span>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture has_icons_small_example %}
-<div class="field">
-  <label class="label is-small">Small input</label>
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-small" type="email" placeholder="Email">
-    <span class="icon is-small is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-small is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture has_icons_normal_example %}
-<div class="field">
-  <label class="label">Normal input</label>
-  <p class="control has-icons-left has-icons-right">
-    <input class="input" type="email" placeholder="Email">
-    <span class="icon is-small is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-small is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control has-icons-left has-icons-right">
-    <input class="input" type="email" placeholder="Email">
-    <span class="icon is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture has_icons_medium_example %}
-<div class="field">
-  <label class="label is-medium">Medium input</label>
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-medium" type="email" placeholder="Email">
-    <span class="icon is-small is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-small is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-medium" type="email" placeholder="Email">
-    <span class="icon is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-medium" type="email" placeholder="Email">
-    <span class="icon is-medium is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-medium is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture has_icons_large_example %}
-<div class="field">
-  <label class="label is-large">Large input</label>
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-large" type="email" placeholder="Email">
-    <span class="icon is-small is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-small is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-large" type="email" placeholder="Email">
-    <span class="icon is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-large" type="email" placeholder="Email">
-    <span class="icon is-medium is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-medium is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-
-<div class="field">
-  <p class="control has-icons-left has-icons-right">
-    <input class="input is-large" type="email" placeholder="Email">
-    <span class="icon is-large is-left">
-      <i class="fa fa-envelope"></i>
-    </span>
-    <span class="icon is-large is-right">
-      <i class="fa fa-check"></i>
-    </span>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture addons_example %}
-<div class="field has-addons">
-  <p class="control">
-    <input class="input" type="text" placeholder="Find a repository">
-  </p>
-  <p class="control">
-    <a class="button is-info">
-      Search
-    </a>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture addons_static_example %}
-<div class="field has-addons">
-  <p class="control">
-    <input class="input" type="text" placeholder="Your email">
-  </p>
-  <p class="control">
-    <a class="button is-static">
-      @gmail.com
-    </a>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture addons_expanded_example %}
-<div class="field has-addons">
-  <p class="control">
-    <span class="select">
-      <select>
-        <option>$</option>
-        <option>£</option>
-        <option>€</option>
-      </select>
-    </span>
-  </p>
-  <p class="control">
-    <input class="input" type="text" placeholder="Amount of money">
-  </p>
-  <p class="control">
-    <a class="button">
-      Transfer
-    </a>
-  </p>
-</div>
-
-<div class="field has-addons">
-  <p class="control">
-    <span class="select">
-      <select>
-        <option>$</option>
-        <option>£</option>
-        <option>€</option>
-      </select>
-    </span>
-  </p>
-  <p class="control is-expanded">
-    <input class="input" type="text" placeholder="Amount of money">
-  </p>
-  <p class="control">
-    <a class="button">
-      Transfer
-    </a>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture addons_expanded_fullwidth_example %}
-<div class="field has-addons">
-  <p class="control is-expanded">
-    <span class="select is-fullwidth">
-      <select name="country">
-        <option value="Argentina">Argentina</option>
-        <option value="Bolivia">Bolivia</option>
-        <option value="Brazil">Brazil</option>
-        <option value="Chile">Chile</option>
-        <option value="Colombia">Colombia</option>
-        <option value="Ecuador">Ecuador</option>
-        <option value="Guyana">Guyana</option>
-        <option value="Paraguay">Paraguay</option>
-        <option value="Peru">Peru</option>
-        <option value="Suriname">Suriname</option>
-        <option value="Uruguay">Uruguay</option>
-        <option value="Venezuela">Venezuela</option>
-      </select>
-    </span>
-  </p>
-  <p class="control">
-    <button type="submit" class="button is-primary">Choose</button>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture addons_center_example %}
-<div class="field has-addons has-addons-centered">
-  <p class="control">
-    <span class="select">
-      <select>
-        <option>$</option>
-        <option>£</option>
-        <option>€</option>
-      </select>
-    </span>
-  </p>
-  <p class="control">
-    <input class="input" type="text" placeholder="Amount of money">
-  </p>
-  <p class="control">
-    <a class="button is-primary">
-      Transfer
-    </a>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture addons_right_example %}
-<div class="field has-addons has-addons-right">
-  <p class="control">
-    <span class="select">
-      <select>
-        <option>$</option>
-        <option>£</option>
-        <option>€</option>
-      </select>
-    </span>
-  </p>
-  <p class="control">
-    <input class="input" type="text" placeholder="Amount of money">
-  </p>
-  <p class="control">
-    <a class="button is-primary">
-      Transfer
-    </a>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture group_example %}
-<div class="field is-grouped">
-  <p class="control is-expanded">
-    <input class="input" type="text" placeholder="Find a repository">
-  </p>
-  <p class="control">
-    <a class="button is-info">
-      Search
-    </a>
-  </p>
-</div>
-{% endcapture %}
-
-{% capture horizontal_form_example %}
-<div class="field is-horizontal">
-  <div class="field-label is-normal">
-    <label class="label">From</label>
-  </div>
-  <div class="field-body">
-    <div class="field is-grouped">
-      <p class="control is-expanded has-icons-left">
-        <input class="input" type="text" placeholder="Name">
-        <span class="icon is-small is-left">
-          <i class="fa fa-user"></i>
-        </span>
-      </p>
-    </div>
-    <div class="field">
-      <p class="control is-expanded has-icons-left has-icons-right">
-        <input class="input is-success" type="email" placeholder="Email" value="alex@smith.com">
-        <span class="icon is-small is-left">
-          <i class="fa fa-envelope"></i>
-        </span>
-        <span class="icon is-small is-right">
-          <i class="fa fa-check"></i>
-        </span>
-      </p>
-      <p class="help is-success">This email is correct</p>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-normal">
-    <label class="label">Department</label>
-  </div>
-  <div class="field-body">
-    <div class="field is-narrow">
-      <div class="control">
-        <div class="select is-fullwidth">
-          <select>
-            <option>Business development</option>
-            <option>Marketing</option>
-            <option>Sales</option>
-          </select>
-        </div>
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label">
-    <label class="label">Already a member?</label>
-  </div>
-  <div class="field-body">
-    <div class="field is-narrow">
-      <div class="control">
-        <label class="radio">
-          <input type="radio" name="member">
-          Yes
-        </label>
-        <label class="radio">
-          <input type="radio" name="member">
-          No
-        </label>
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-normal">
-    <label class="label">Subject</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <input class="input is-danger" type="text" placeholder="e.g. Partnership opportunity">
-      </div>
-      <p class="help is-danger">
-        This field is required
-      </p>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-normal">
-    <label class="label">Question</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <textarea class="textarea" placeholder="Explain how we can help you"></textarea>
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label">
-    <!-- Left empty for spacing -->
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <button class="button is-primary">
-          Send message
-        </button>
-      </div>
-    </div>
-  </div>
-</div>
-{% endcapture %}
-
-{% capture field_label_example %}
-<div class="field is-horizontal">
-  <div class="field-label">
-    <label class="label">No padding</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <label class="checkbox">
-          <input type="checkbox">
-          Checkbox
-        </label>
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-small">
-    <label class="label">Small padding</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <input class="input is-small" type="text" placeholder="Small sized input">
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-normal">
-    <label class="label">Normal label</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <input class="input" type="text" placeholder="Normal sized input">
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-medium">
-    <label class="label">Medium label</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <input class="input is-medium" type="text" placeholder="Medium sized input">
-      </div>
-    </div>
-  </div>
-</div>
-
-<div class="field is-horizontal">
-  <div class="field-label is-large">
-    <label class="label">Large label</label>
-  </div>
-  <div class="field-body">
-    <div class="field">
-      <div class="control">
-        <input class="input is-large" type="text" placeholder="Large sized input">
-      </div>
-    </div>
-  </div>
-</div>
-{% endcapture %}
-
-{% include subnav-elements.html %}
-
-<section class="section">
-  <div class="container">
-    <h1 class="title">Form controls</h1>
-    <h2 class="subtitle">
-      All generic <strong>form controls</strong>, designed for consistency
-    </h2>
-
-    <hr>
-
-    <div class="content">
-      <p>The following form controls <strong>classes</strong> are supported:</p>
-      <ul>
-        <li><code>.label</code></li>
-        <li><code>.input</code></li>
-        <li><code>.textarea</code></li>
-        <li><code>.select</code></li>
-        <li><code>.checkbox</code></li>
-        <li><code>.radio</code></li>
-        <li><code>.button</code></li>
-        <li><code>.help</code></li>
-      </ul>
-      <p>Each of them should be wrapped in a <code>.control</code> container.<br>
-      When combining several controls in a <strong>form</strong>, use the <code>.field</code> class as a <strong>container</strong>, to keep the spacing consistent.</p>
-    </div>
-
-    <div class="columns">
-      <div class="column is-half">
-        {{form_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{form_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <hr>
-
-    <h3 class="title">Colors</h3>
-    <div class="columns">
-      <div class="column is-half">
-        {{colors_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{colors_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <hr>
-    <h3 class="title">Sizes</h3>
-    <div class="columns">
-      <div class="column is-half">
-        {{sizes_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{sizes_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <hr>
-
-    <h3 class="title">States</h3>
-    <h4 class="subtitle">Normal</h4>
-    <div class="columns">
-      <div class="column is-half">
-        {{normal_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{normal_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <h4 class="subtitle">Hover</h4>
-    <div class="columns">
-      <div class="column is-half">
-        {{hover_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{hover_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <h4 class="subtitle">Focus</h4>
-    <div class="columns">
-      <div class="column is-half">
-        {{focus_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{focus_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <h4 class="subtitle">Loading</h4>
-    <div class="columns">
-      <div class="column is-half">
-        {{loading_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{loading_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    {% if site.vernum >= 43 %}
-      <div class="columns">
-        <div class="column is-half">
-          <p style="margin-bottom: 0.5rem;">
-            <span class="tag is-success">New!</span>
-            <span class="tag is-info">0.4.3</span>
-          </p>
-          <div class="content">
-            <p>
-              You can resize the loading spinner by appending <code>is-small</code>, <code>is-medium</code> or <code>is-large</code> to the <code>control</code> container.
-            </p>
-          </div>
-          {{loading_sizes_example}}
-        </div>
-        <div class="column is-half">
-          {% highlight html %}{{loading_sizes_example}}{% endhighlight %}
-        </div>
-      </div>
-    {% endif %}
-
-    <h4 class="subtitle">Disabled</h4>
-    <div class="columns">
-      <div class="column is-half">
-        {{disabled_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{disabled_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <!-- Font Awesome Icons -->
-    <hr>
-
-    <h3 class="title">With icons</h3>
-    <div class="content">
-      <p>You can append one of 2 <strong>modifiers</strong> on a control:</p>
-      <ul>
-        <li>
-          <code>has-icons-left</code>
-        </li>
-        <li>
-          and/or <code>has-icons-right</code>
-        </li>
-      </ul>
-      <p>You also need to add a modifier on the <strong>icon</strong>:</p>
-      <ul>
-        <li>
-          <code>icon is-left</code> if <code>has-icons-left</code> is used
-        </li>
-        <li>
-          <code>icon is-right</code> if <code>has-icons-right</code> is used
-        </li>
-      </ul>
-      <p>The size of the <strong>input</strong> will define the size of the icon container.</p>
-    </div>
-    <div class="columns">
-      <div class="column is-half">
-        {{icons_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{icons_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <div class="columns">
-      <div class="column is-half">
-        <div class="content">
-          <p>
-            <span class="tag is-success">New!</span>
-            <span class="tag is-info">0.4.2</span>
-          </p>
-          <p>
-            You can now append icons to <strong>select dropdowns</strong> as well.
-          </p>
-        </div>
-        {{select_icons_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{select_icons_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <div class="content">
-      <p>
-        If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
-      </p>
-    </div>
-
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_small_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_small_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_normal_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_normal_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_medium_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_medium_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_large_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_large_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <hr>
-
-    <h3 id="form-addons" class="title">Form addons</h3>
-    <div class="content">
-      <p>If you want to <strong>attach</strong> controls together, use the <code>has-addons</code> modifier on the <code>control</code> container:</p>
-    </div>
-    <div class="bd-example">
-        {{addons_example}}
-    </div>
-        {% highlight html %}{{addons_example}}{% endhighlight %}
-    <div class="content">
-      <p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
-    </div>
-
-    <div class="content">
-      <p>
-        <span class="tag is-success">New!</span>
-        <span class="tag is-info">0.4.2</span>
-      </p>
-      <p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
-    </div>
-
-    <div class="bd-example">
-        {{addons_static_example}}
-    </div>
-        {% highlight html %}{{addons_static_example}}{% endhighlight %}
-
-    <div class="content">
-      <p>Use the <code>is-expanded</code> modifier on the element you want to fill up the remaining space (in this case, the input):</p>
-    </div>
-    <div class="bd-example">
-        {{addons_expanded_example}}
-    </div>
-        {% highlight html %}{{addons_expanded_example}}{% endhighlight %}
-
-    <div class="content">
-      <p>If you want a full width select dropdown, pair <code>control is-expanded</code> with <code>select is-fullwidth</code>.</p>
-    </div>
-    <div class="bd-example">
-      {{addons_expanded_fullwidth_example}}
-    </div>
-    {% highlight html %}{{addons_expanded_fullwidth_example}}{% endhighlight %}
-
-    <div class="content">
-      <p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifers to alter the <strong>alignment</strong>.</p>
-    </div>
-    <div class="bd-example">
-      {{addons_center_example}}
-    </div>
-    {% highlight html %}{{addons_center_example}}{% endhighlight %}
-    <div class="bd-example">
-      {{addons_right_example}}
-    </div>
-    {% highlight html %}{{addons_right_example}}{% endhighlight %}
-
-    <hr>
-
-    <h3 class="title">Form group</h3>
-    <div class="content">
-      <p>
-        If you want to <strong>group</strong> controls together, use the <code>is-grouped</code> modifier on the <code>control</code> container.
-        <br>
-        Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifers to alter the <strong>alignment</strong>.
-      </p>
-      <p>
-        Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong>.
-      </p>
-    </div>
-    <div class="bd-example">
-      {{group_example}}
-    </div>
-    {% highlight html %}{{group_example}}{% endhighlight %}
-
-    <hr>
-
-    <h3 class="title">Horizontal form</h3>
-    <div class="content">
-      <p>If you want a <strong>horizontal</strong> form control, use the <code>is-horizontal</code> modifier on the <code>field</code> container, in which you include:</p>
-      <ul>
-        <li>
-          <code>field-label</code> for the side label
-        </li>
-        <li>
-          <code>field-body</code> for the input/select/textarea container
-        </li>
-      </ul>
-      <p>You can of course use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
-    </div>
-    <div class="bd-example">
-      {{horizontal_form_example}}
-    </div>
-    {% highlight html %}{{horizontal_form_example}}{% endhighlight %}
-
-    <div class="content">
-      <p>
-        <span class="tag is-success">New!</span>
-      </p>
-      <p>
-        To preserve the <strong>vertical alignment</strong> of labels with each type and size of control, the <code>.field-label</code> comes with <strong>4 size modifiers</strong>:
-      </p>
-      <ul>
-        <li>
-          <code>.is-small</code>
-        </li>
-        <li>
-          <code>.is-normal</code> for any <code>.input</code> or <code>.button</code>
-        </li>
-        <li>
-          <code>.is-medium</code>
-        </li>
-        <li>
-          <code>.is-large</code>
-        </li>
-      </ul>
-    </div>
-    <div class="bd-example">
-      {{field_label_example}}
-    </div>
-    {% highlight html %}{{field_label_example}}{% endhighlight %}
-  </div>
-</section>

+ 20 - 91
docs/documentation/form/file.html

@@ -591,16 +591,7 @@ variables:
       </ul>
     </div>
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file }}
-        </div>
-      </div>
-      <div class="column highlight-full">
-        {% highlight html %}{{ file }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file %}
 
     {% include anchor.html name="Modifiers" %}
 
@@ -686,29 +677,21 @@ variables:
 
     {% include anchor.html name="Colors" %}
 
-    <div class="columns">
-      <div class="column">
-        <div class="content">
-          <p>
-            You can style the file element by appending one of the <strong>9 color modifiers</strong>:
-          </p>
-          <ul>
-            {% for color in site.colors %}
-              <li>
-                <code>is-{{ color }}</code>
-              </li>
-            {% endfor %}
-          </ul>
-        </div>
-        <div class="bd-example">
-          {{ file_colors }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_colors }}{% endhighlight %}
-      </div>
+    <div class="content">
+      <p>
+        You can style the file element by appending one of the <strong>9 color modifiers</strong>:
+      </p>
+      <ul>
+        {% for color in site.colors %}
+          <li>
+            <code>is-{{ color }}</code>
+          </li>
+        {% endfor %}
+      </ul>
     </div>
 
+    {% include snippet.html content=file_colors clipped=true %}
+
     {% include anchor.html name="Sizes" %}
 
     <div class="content">
@@ -728,49 +711,13 @@ variables:
       </ul>
     </div>
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file_sizes }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_sizes }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file_sizes clipped=true %}
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file_sizes_name }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_sizes_name }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file_sizes_name clipped=true %}
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file_sizes_boxed }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_sizes_boxed }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file_sizes_boxed clipped=true %}
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file_sizes_boxed_name }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_sizes_boxed_name }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file_sizes_boxed_name clipped=true %}
 
     {% include anchor.html name="Alignment" %}
 
@@ -788,27 +735,9 @@ variables:
       </ul>
     </div>
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file_centered }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_centered }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file_centered %}
 
-    <div class="columns">
-      <div class="column">
-        <div class="bd-example">
-          {{ file_right }}
-        </div>
-      </div>
-      <div class="column">
-        {% highlight html %}{{ file_right }}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=file_right %}
 
     {% include anchor.html name="JavaScript" %}
 

+ 52 - 170
docs/documentation/form/general.html

@@ -815,16 +815,14 @@ doc-subtab: general
 
     <div class="columns">
       <div class="column is-half">
-        {{example}}
+        {{ example }}
       </div>
       <div class="column is-half">
-        {% highlight html %}{{example}}{% endhighlight %}
+        {% highlight html %}{{ example }}{% endhighlight %}
       </div>
     </div>
 
-    <hr>
-
-    <h3 id="form-field" class="title">Form field</h3>
+    {% include anchor.html name="Form field" %}
 
     <div class="content">
       <p>The <code>field</code> container is a simple container for:</p>
@@ -835,31 +833,15 @@ doc-subtab: general
       </ul>
     </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        {{field_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{field_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=field_example %}
 
     <div class="content">
       <p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
     </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        {{fields_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{fields_example}}{% endhighlight %}
-      </div>
-    </div>
-
-    <hr>
+    {% include snippet.html content=fields_example %}
 
-    <h3 id="form-control" class="title">Form control</h3>
+    {% include anchor.html name="Form control" %}
 
     <div class="content">
       <p>The <code>control</code> is a versatile container meant to <strong>enhance single form controls</strong>. Because it has the same height as a control elements, it can <strong class="has-text-danger">only contain</strong> the following elements:</p>
@@ -871,37 +853,15 @@ doc-subtab: general
       </ul>
     </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        {{control_input_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{control_input_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=control_input_example %}
 
-    <div class="columns">
-      <div class="column is-half">
-        {{control_select_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{control_select_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=control_select_example %}
 
-    <div class="columns">
-      <div class="column is-half">
-        {{control_button_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{control_button_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=control_button_example %}
 
     <!-- Font Awesome Icons -->
-    <hr>
+    {% include anchor.html name="With icons" %}
 
-    <h3 class="title">With icons</h3>
     <div class="content">
       <p>You can append one of 2 <strong>modifiers</strong> on a control:</p>
       <ul>
@@ -923,80 +883,39 @@ doc-subtab: general
       </ul>
       <p>The size of the <strong>input</strong> will define the size of the icon container.</p>
     </div>
-    <div class="columns">
-      <div class="column is-half">
-        {{icons_example}}
-      </div>
-      <div class="column is-half highlight-full">
-        {% highlight html %}{{icons_example}}{% endhighlight %}
-      </div>
-    </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        <div class="content">
-          <p>
-            You can append icons to <strong>select dropdowns</strong> as well.
-          </p>
-        </div>
-        {{select_icons_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{select_icons_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=icons_example clipped=true %}
 
-    <div class="columns">
-      <div class="column is-half">
-        <div class="content">
-          <p>
-            If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
-          </p>
-        </div>
-        {{has_icons_small_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_small_example}}{% endhighlight %}
-      </div>
+    <div class="content">
+      <p>
+        You can append icons to <strong>select dropdowns</strong> as well.
+      </p>
     </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_normal_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_normal_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=select_icons_example %}
 
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_medium_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_medium_example}}{% endhighlight %}
-      </div>
+    <div class="content">
+      <p>
+        If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
+      </p>
     </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        {{has_icons_large_example}}
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{has_icons_large_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=has_icons_small_example %}
 
-    <hr>
+    {% include snippet.html content=has_icons_normal_example clipped=true %}
+
+    {% include snippet.html content=has_icons_medium_example clipped=true %}
+
+    {% include snippet.html content=has_icons_large_example clipped=true %}
+
+    {% include anchor.html name="Form addons" %}
 
-    <h3 id="form-addons" class="title">Form addons</h3>
     <div class="content">
       <p>If you want to <strong>attach controls</strong> together, use the <code>has-addons</code> modifier on the <code>field</code> container:</p>
     </div>
-    <div class="bd-example">
-      {{addons_example}}
-    </div>
-    {% highlight html %}{{addons_example}}{% endhighlight %}
+
+    {% include snippet.html content=addons_example %}
+
     <div class="content">
       <p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
     </div>
@@ -1009,67 +928,46 @@ doc-subtab: general
       <p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
     </div>
 
-    <div class="bd-example">
-      {{addons_static_example}}
-    </div>
-    {% highlight html %}{{addons_static_example}}{% endhighlight %}
+    {% include snippet.html content=addons_static_example %}
 
     <div class="content">
       <p>Use the <code>is-expanded</code> modifier on the element you want to fill up the remaining space (in this case, the input):</p>
     </div>
-    <div class="bd-example">
-      {{addons_expanded_example}}
-    </div>
-    {% highlight html %}{{addons_expanded_example}}{% endhighlight %}
+
+    {% include snippet.html content=addons_expanded_example horizontal=true clipped=true %}
 
     <div class="content">
       <p>If you want a full width select dropdown, pair <code>control is-expanded</code> with <code>select is-fullwidth</code>.</p>
     </div>
-    <div class="bd-example">
-      {{addons_expanded_fullwidth_example}}
-    </div>
-    {% highlight html %}{{addons_expanded_fullwidth_example}}{% endhighlight %}
+
+    {% include snippet.html content=addons_expanded_fullwidth_example %}
 
     <div class="content">
       <p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifers to alter the <strong>alignment</strong>.</p>
     </div>
-    <div class="bd-example">
-      {{addons_center_example}}
-    </div>
-    {% highlight html %}{{addons_center_example}}{% endhighlight %}
-    <div class="bd-example">
-      {{addons_right_example}}
-    </div>
-    {% highlight html %}{{addons_right_example}}{% endhighlight %}
 
-    <hr>
+    {% include snippet.html content=addons_center_example %}
+
+    {% include snippet.html content=addons_right_example %}
+
+    {% include anchor.html name="Form group" %}
 
-    <h3 class="title">Form group</h3>
     <div class="content">
       <p>
         If you want to <strong>group</strong> controls together, use the <code>is-grouped</code> modifier on the <code>field</code> container.
       </p>
     </div>
 
-    <div class="bd-example">
-      {{group_example}}
-    </div>
-    {% highlight html %}{{group_example}}{% endhighlight %}
+    {% include snippet.html content=group_example %}
 
     <div class="content">
         Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifers to alter the <strong>alignment</strong>.
       </p>
     </div>
 
-    <div class="bd-example">
-      {{group_centered_example}}
-    </div>
-    {% highlight html %}{{group_centered_example}}{% endhighlight %}
+    {% include snippet.html content=group_centered_example %}
 
-    <div class="bd-example">
-      {{group_right_example}}
-    </div>
-    {% highlight html %}{{group_right_example}}{% endhighlight %}
+    {% include snippet.html content=group_right_example %}
 
     <div class="content">
       <p>
@@ -1077,10 +975,7 @@ doc-subtab: general
       </p>
     </div>
 
-    <div class="bd-example">
-      {{group_expanded_example}}
-    </div>
-    {% highlight html %}{{group_expanded_example}}{% endhighlight %}
+    {% include snippet.html content=group_expanded_example %}
 
     <div id="form-group-multiline" class="content">
       <p>
@@ -1092,20 +987,10 @@ doc-subtab: general
       </p>
     </div>
 
-    <div class="columns">
-      <div class="column is-half">
-        <div class="bd-example">
-          {{group_multiline_example}}
-        </div>
-      </div>
-      <div class="column is-half">
-        {% highlight html %}{{group_multiline_example}}{% endhighlight %}
-      </div>
-    </div>
+    {% include snippet.html content=group_multiline_example clipped=true %}
 
-    <hr>
+    {% include anchor.html name="Horizontal form" %}
 
-    <h3 class="title">Horizontal form</h3>
     <div class="content">
       <p>If you want a <strong>horizontal</strong> form control, use the <code>is-horizontal</code> modifier on the <code>field</code> container, in which you include:</p>
       <ul>
@@ -1118,10 +1003,8 @@ doc-subtab: general
       </ul>
       <p>You can use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
     </div>
-    <div class="bd-example">
-      {{horizontal_form_example}}
-    </div>
-    {% highlight html %}{{horizontal_form_example}}{% endhighlight %}
+
+    {% include snippet.html content=horizontal_form_example horizontal=true clipped=true %}
 
     <div class="content">
       <p>
@@ -1142,9 +1025,8 @@ doc-subtab: general
         </li>
       </ul>
     </div>
-    <div class="bd-example">
-      {{field_label_example}}
-    </div>
-    {% highlight html %}{{field_label_example}}{% endhighlight %}
+
+    {% include snippet.html content=field_label_example horizontal=true clipped=true %}
+
   </div>
 </section>

+ 5 - 0
sass/elements/form.sass

@@ -75,6 +75,11 @@ $help-size: $size-small !default
     $color: nth($pair, 1)
     &.is-#{$name}
       border-color: $color
+      &:focus,
+      &.is-focused,
+      &:active,
+      &.is-active
+        box-shadow: $input-focus-box-shadow-size rgba($color, 0.25)
   // Sizes
   &.is-small
     +control-small