More snippets

This commit is contained in:
Jeremy Thomas 2017-08-30 22:21:30 +01:00
parent 3b0cb2ad4e
commit 695c72c6a9
11 changed files with 188 additions and 2002 deletions

View File

@ -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">

View File

@ -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

View File

@ -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;
}

View File

@ -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 %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

File diff suppressed because it is too large Load Diff

View File

@ -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,8 +677,6 @@ 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>:
@ -700,14 +689,8 @@ variables:
{% endfor %}
</ul>
</div>
<div class="bd-example">
{{ file_colors }}
</div>
</div>
<div class="column">
{% highlight html %}{{ file_colors }}{% endhighlight %}
</div>
</div>
{% include snippet.html content=file_colors clipped=true %}
{% include anchor.html name="Sizes" %}
@ -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" %}

View File

@ -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>
{% include snippet.html content=fields_example %}
<hr>
<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">
{% include snippet.html content=icons_example clipped=true %}
<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>
<div class="columns">
<div class="column is-half">
{% include snippet.html content=select_icons_example %}
<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>
<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=has_icons_small_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>
{% include snippet.html content=has_icons_normal_example clipped=true %}
<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_medium_example clipped=true %}
<hr>
{% 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>

View File

@ -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