Container broken layout

This commit is contained in:
Jeremy Thomas
2018-04-09 16:15:58 +01:00
parent f0074aa339
commit 25d0ea1136
18 changed files with 1262 additions and 1244 deletions

View File

@@ -1,8 +1,18 @@
---
title: Checkbox
subtitle: "The 2-state <strong>checkbox</strong> in its native format"
layout: documentation
doc-tab: form
doc-subtab: checkbox
breadcrumb:
- home
- documentation
- form
- form-checkbox
meta:
colors: false
sizes: false
variables: false
---
{% capture checkbox_example %}
@@ -26,60 +36,41 @@ doc-subtab: checkbox
</label>
{% endcapture %}
{% include subnav/subnav-form.html %}
<div class="content">
<p>
The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
</p>
</div>
<section class="section">
<div class="container">
<h1 class="title">Checkbox</h1>
<h2 class="subtitle">
The 2-state <strong>checkbox</strong> in its native format
</h2>
{%
include meta.html
colors=false
sizes=false
variables=false
%}
<hr>
<div class="content">
<p>
The <code>checkbox</code> class is a simple wrapper around the <code>&lt;input type="checkbox"&gt;</code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{checkbox_example}}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_link_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{checkbox_link_example}}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_disabled_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_example}}
</div>
</section>
<div class="column is-half highlight-full">
{% highlight html %}{{checkbox_example}}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
You can add <strong>links</strong> to your checkbox, or even <strong>disable</strong> it.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_link_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{checkbox_link_example}}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">
{{checkbox_disabled_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{checkbox_disabled_example}}{% endhighlight %}
</div>
</div>

View File

@@ -1,8 +1,14 @@
---
title: File upload
subtitle: "A custom <strong>file upload</strong> input, without JavaScript"
layout: documentation
doc-tab: form
doc-subtab: file
breadcrumb:
- home
- documentation
- form
- form-file
file_name: "Screen Shot 2017-07-29 at 15.54.25.png"
variables_keys:
- file-border-color
@@ -15,6 +21,11 @@ variables_keys:
- file-name-border-style
- file-name-border-width
- file-name-max-width
meta:
experimental: true
colors: true
sizes: true
variables: true
---
{% capture file %}
@@ -527,253 +538,231 @@ variables_keys:
</div>
{% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">File upload</h1>
<h2 class="subtitle">
A custom <strong>file upload</strong> input, without JavaScript
</h2>
{%
include meta.html
experimental=true
since="0.5.1"
colors=true
sizes=true
variables=true
%}
<hr>
<div class="content">
<p>
The <code>.file</code> element is a simple <strong>interactive label</strong> that wraps an <code>&lt;input type="file"&gt;</code>. It comprises several sub-elements:
</p>
<div class="content">
<p>
The <code>.file</code> element is a simple <strong>interactive label</strong> that wraps an <code>&lt;input type="file"&gt;</code>. It comprises several sub-elements:
</p>
<ul>
<li>
<code>.file</code> the main <strong>container</strong>
<ul>
<li>
<code>.file</code> the main <strong>container</strong>
<code>.file-label</code> the actual <strong>interactive</strong> and clickable part of the element
<ul>
<li>
<code>.file-label</code> the actual <strong>interactive</strong> and clickable part of the element
<code>.file-input</code> the <strong>native</strong> file input, hidden for styling purposes
</li>
<li>
<code>.file-cta</code> the upload <strong>call-to-action</strong>
<ul>
<li>
<code>.file-input</code> the <strong>native</strong> file input, hidden for styling purposes
<code>.file-icon</code> an optional <strong>upload</strong> icon
</li>
<li>
<code>.file-cta</code> the upload <strong>call-to-action</strong>
<ul>
<li>
<code>.file-icon</code> an optional <strong>upload</strong> icon
</li>
<li>
<code>.file-label</code> the "Choose a file…" text
</li>
</ul>
</li>
<li>
<code>.file-name</code> a container for the <strong>chosen file</strong> name
<code>.file-label</code> the "Choose a file…" text
</li>
</ul>
</li>
<li>
<code>.file-name</code> a container for the <strong>chosen file</strong> name
</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
</div>
{% include snippet.html content=file %}
{% include snippet.html content=file %}
{% include anchor.html name="Modifiers" %}
<div class="columns">
<div class="column">
<div class="content">
<p>
With the <code>.has-name</code> modifier combined with the <code>.file-name</code> element, you can add a <strong>placeholder</strong> for the selected file name.
</p>
</div>
<div class="bd-example">
{{ file_name }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_name }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can move the CTA to the <strong>right side</strong> with the <code>.is-right</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_name_right }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_name_right }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can also <strong>expand</strong> the name to fill up the space with the <code>.is-fullwidth</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_name_fullwidth }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_name_fullwidth }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can have a <strong>boxed block</strong> with the <code>.is-boxed</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_boxed }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_boxed }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can <strong>combine</strong> <code>.has-name</code> and <code>.is-boxed</code>.
</p>
</div>
<div class="bd-example">
{{ file_boxed_name }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_boxed_name }}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Colors" %}
{% include anchor.html name="Modifiers" %}
<div class="columns">
<div class="column">
<div class="content">
<p>
You can style the file element by appending one of the <strong>{{ site.data.colors.derived | size }} color modifiers</strong>:
</p>
<ul>
{% for color in site.data.colors.derived %}
<li>
<code>is-{{ color.id }}</code>
</li>
{% endfor %}
</ul>
</div>
{% include snippet.html content=file_colors clipped=true %}
{% include anchor.html name="Sizes" %}
<div class="content">
<p>
You can append one of <strong>3 additional sizes</strong>:
</p>
<ul>
<li>
<code>.is-small</code>
</li>
<li>
<code>.is-medium</code>
</li>
<li>
<code>.is-large</code>
</li>
</ul>
</div>
{% include snippet.html content=file_sizes clipped=true %}
{% include snippet.html content=file_sizes_name clipped=true %}
{% include snippet.html content=file_sizes_boxed clipped=true %}
{% include snippet.html content=file_sizes_boxed_name clipped=true %}
{% include anchor.html name="Alignment" %}
<div class="content">
<p>
You can <strong>align</strong> the file input:
</p>
<ul>
<li>
to the <strong>center</strong> with the <code>is-centered</code> modifier
</li>
<li>
to the <strong>right</strong> with the <code>is-right</code> modifier
</li>
</ul>
</div>
{% include snippet.html content=file_centered %}
{% include snippet.html content=file_right %}
{% include anchor.html name="JavaScript" %}
<div class="content">
<p>
A file upload input requires JavaScript to <strong>retrieve</strong> the <strong>selected file name</strong>.
<br>
User <a href="https://github.com/chintanbanugaria"><strong>@chintanbanugaria</strong></a> on GitHub <a href="https://github.com/jgthms/bulma/issues/280#issuecomment-294099510">has provided</a> a simple solution <a href="https://jsfiddle.net/chintanbanugaria/uzva5byy/">on JSFiddle</a>.
With the <code>.has-name</code> modifier combined with the <code>.file-name</code> element, you can add a <strong>placeholder</strong> for the selected file name.
</p>
</div>
{% include anchor.html name="Variables" %}
<div class="content">
<p>
You can use <a href="{{ site.data.meta.github | append: '/blob/master/sass/elements/form.sass#L25,L36' }}" target="_blank">these variables</a> to <strong>customize</strong> this element. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
</p>
<div class="bd-example">
{{ file_name }}
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</tfoot>
<tbody>
{% for key in page.variables_keys %}
{% assign variable = site.data.variables.elements.form.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
<div class="column highlight-full">
{% highlight html %}{{ file_name }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can move the CTA to the <strong>right side</strong> with the <code>.is-right</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_name_right }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_name_right }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can also <strong>expand</strong> the name to fill up the space with the <code>.is-fullwidth</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_name_fullwidth }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_name_fullwidth }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can have a <strong>boxed block</strong> with the <code>.is-boxed</code> modifier.
</p>
</div>
<div class="bd-example">
{{ file_boxed }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_boxed }}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column">
<div class="content">
<p>
You can <strong>combine</strong> <code>.has-name</code> and <code>.is-boxed</code>.
</p>
</div>
<div class="bd-example">
{{ file_boxed_name }}
</div>
</div>
<div class="column highlight-full">
{% highlight html %}{{ file_boxed_name }}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Colors" %}
<div class="content">
<p>
You can style the file element by appending one of the <strong>{{ site.data.colors.derived | size }} color modifiers</strong>:
</p>
<ul>
{% for color in site.data.colors.derived %}
<li>
<code>is-{{ color.id }}</code>
</li>
{% endfor %}
</ul>
</div>
{% include snippet.html content=file_colors clipped=true %}
{% include anchor.html name="Sizes" %}
<div class="content">
<p>
You can append one of <strong>3 additional sizes</strong>:
</p>
<ul>
<li>
<code>.is-small</code>
</li>
<li>
<code>.is-medium</code>
</li>
<li>
<code>.is-large</code>
</li>
</ul>
</div>
{% include snippet.html content=file_sizes clipped=true %}
{% include snippet.html content=file_sizes_name clipped=true %}
{% include snippet.html content=file_sizes_boxed clipped=true %}
{% include snippet.html content=file_sizes_boxed_name clipped=true %}
{% include anchor.html name="Alignment" %}
<div class="content">
<p>
You can <strong>align</strong> the file input:
</p>
<ul>
<li>
to the <strong>center</strong> with the <code>is-centered</code> modifier
</li>
<li>
to the <strong>right</strong> with the <code>is-right</code> modifier
</li>
</ul>
</div>
{% include snippet.html content=file_centered %}
{% include snippet.html content=file_right %}
{% include anchor.html name="JavaScript" %}
<div class="content">
<p>
A file upload input requires JavaScript to <strong>retrieve</strong> the <strong>selected file name</strong>.
<br>
User <a href="https://github.com/chintanbanugaria"><strong>@chintanbanugaria</strong></a> on GitHub <a href="https://github.com/jgthms/bulma/issues/280#issuecomment-294099510">has provided</a> a simple solution <a href="https://jsfiddle.net/chintanbanugaria/uzva5byy/">on JSFiddle</a>.
</p>
</div>
{% include anchor.html name="Variables" %}
<div class="content">
<p>
You can use <a href="{{ site.data.meta.github | append: '/blob/master/sass/elements/form.sass#L25,L36' }}" target="_blank">these variables</a> to <strong>customize</strong> this element. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
</p>
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</tfoot>
<tbody>
{% for key in page.variables_keys %}
{% assign variable = site.data.variables.elements.form.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -1,8 +1,14 @@
---
title: Form controls
subtitle: "All generic <strong>form controls</strong>, designed for consistency"
layout: documentation
doc-tab: form
doc-subtab: general
breadcrumb:
- home
- documentation
- form
- form-general
variables_controls_keys:
- control-radius
- control-radius-small
@@ -795,292 +801,278 @@ variables_form_keys:
</div>
{% endcapture %}
{% include subnav/subnav-form.html %}
<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>
<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>
{% include snippet.html content=example more=true %}
<hr>
{% include anchor.html name="Form field" %}
<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="content">
<p>The <code>field</code> container is a simple container for:</p>
<ul>
<li>a text <code>label</code></li>
<li>a form <code>control</code></li>
<li>an optional <code>help</code>text</li>
</ul>
</div>
{% include snippet.html content=example more=true %}
{% include snippet.html content=field_example %}
{% include anchor.html name="Form field" %}
<div class="content">
<p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
</div>
<div class="content">
<p>The <code>field</code> container is a simple container for:</p>
<ul>
<li>a text <code>label</code></li>
<li>a form <code>control</code></li>
<li>an optional <code>help</code>text</li>
</ul>
</div>
{% include snippet.html content=fields_example %}
{% include snippet.html content=field_example %}
{% include anchor.html name="Form control" %}
<div class="content">
<p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
</div>
<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>
<ul>
<li><code>input</code></li>
<li><code>select</code></li>
<li><code>button</code></li>
<li><code>icon</code></li>
</ul>
</div>
{% include snippet.html content=fields_example %}
{% include snippet.html content=control_input_example %}
{% include anchor.html name="Form control" %}
{% include snippet.html content=control_select_example %}
<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>
<ul>
<li><code>input</code></li>
<li><code>select</code></li>
<li><code>button</code></li>
<li><code>icon</code></li>
</ul>
</div>
{% include snippet.html content=control_button_example %}
{% include snippet.html content=control_input_example %}
<!-- Font Awesome Icons -->
{% include anchor.html name="With icons" %}
{% include snippet.html content=control_select_example %}
<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>
{% include snippet.html content=control_button_example %}
{% include snippet.html content=icons_example clipped=true %}
<!-- Font Awesome Icons -->
{% include anchor.html name="With icons" %}
<div class="content">
<p>
You can append icons to <strong>select dropdowns</strong> as well.
</p>
</div>
<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>
{% include snippet.html content=select_icons_example %}
{% include snippet.html content=icons_example clipped=true %}
<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="content">
<p>
You can append icons to <strong>select dropdowns</strong> as well.
</p>
</div>
{% include snippet.html content=has_icons_small_example %}
{% include snippet.html content=select_icons_example %}
{% include snippet.html content=has_icons_normal_example clipped=true %}
<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>
{% include snippet.html content=has_icons_medium_example clipped=true %}
{% include snippet.html content=has_icons_small_example %}
{% include snippet.html content=has_icons_large_example clipped=true %}
{% include snippet.html content=has_icons_normal_example clipped=true %}
{% include anchor.html name="Form addons" %}
{% include snippet.html content=has_icons_medium_example clipped=true %}
<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>
{% include snippet.html content=has_icons_large_example clipped=true %}
{% include snippet.html content=addons_example %}
{% include anchor.html name="Form addons" %}
<div class="content">
<p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
</div>
<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="content">
<p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
</div>
{% include snippet.html content=addons_example %}
{% include snippet.html content=addons_static_example %}
<div class="content">
<p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
</div>
<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="content">
<p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
</div>
{% include snippet.html content=addons_expanded_example horizontal=true more=true %}
{% include snippet.html content=addons_static_example %}
<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="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>
{% include snippet.html content=addons_expanded_fullwidth_example %}
{% include snippet.html content=addons_expanded_example horizontal=true more=true %}
<div class="content">
<p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifiers to alter the <strong>alignment</strong>.</p>
</div>
<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>
{% include snippet.html content=addons_center_example %}
{% include snippet.html content=addons_expanded_fullwidth_example %}
{% include snippet.html content=addons_right_example %}
<div class="content">
<p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifiers to alter the <strong>alignment</strong>.</p>
</div>
{% include anchor.html name="Form group" %}
{% include snippet.html content=addons_center_example %}
<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>
{% include snippet.html content=addons_right_example %}
{% include snippet.html content=group_example %}
{% include anchor.html name="Form group" %}
<div class="content">
Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifiers to alter the <strong>alignment</strong>.
</p>
</div>
<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>
{% include snippet.html content=group_centered_example %}
{% include snippet.html content=group_example %}
{% include snippet.html content=group_right_example %}
<div class="content">
Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifiers to alter the <strong>alignment</strong>.
</p>
</div>
<div class="content">
<p>
Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong> with.
</p>
</div>
{% include snippet.html content=group_centered_example %}
{% include snippet.html content=group_expanded_example %}
{% include snippet.html content=group_right_example %}
<div id="form-group-multiline" class="content">
<p>
Add the <code>is-grouped-multiline</code> modifier to allow controls to fill up <strong>multiple lines</strong>. This is ideal for a long list of controls.
</p>
</div>
<div class="content">
<p>
Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong> with.
</p>
</div>
{% include snippet.html content=group_expanded_example %}
<div id="form-group-multiline" class="content">
<p>
Add the <code>is-grouped-multiline</code> modifier to allow controls to fill up <strong>multiple lines</strong>. This is ideal for a long list of controls.
</p>
</div>
{% include snippet.html content=group_multiline_example clipped=true %}
<div class="message is-info">
<div class="message-header">
<p>List of buttons</p>
</div>
<div class="message-body">
<div class="content">
<p>
If you only need a list of <em>buttons</em>, try out the new <code>buttons</code> class with which you can create a <a href="{{ site.url }}/documentation/elements/button/#list-of-buttons">multiline list of buttons</a>.
</p>
</div>
</div>
</div>
{% include anchor.html name="Horizontal form" %}
<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 use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
</div>
{% include snippet.html content=horizontal_form_example horizontal=true more=true %}
<div class="content">
<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>
{% include snippet.html content=field_label_example horizontal=true more=true %}
{% include anchor.html name="Variables" %}
<div class="content">
<p>
Form elements can be <strong>customized</strong> using the following generic variables. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
</p>
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</tfoot>
<tbody>
{% for key in page.variables_controls_keys %}
{% assign variable = site.data.variables.utilities.controls.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
{% for key in page.variables_form_keys %}
{% assign variable = site.data.variables.elements.form.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% include snippet.html content=group_multiline_example clipped=true %}
<div class="message is-info">
<div class="message-header">
<p>List of buttons</p>
</div>
</section>
<div class="message-body">
<div class="content">
<p>
If you only need a list of <em>buttons</em>, try out the new <code>buttons</code> class with which you can create a <a href="{{ site.url }}/documentation/elements/button/#list-of-buttons">multiline list of buttons</a>.
</p>
</div>
</div>
</div>
{% include anchor.html name="Horizontal form" %}
<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 use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
</div>
{% include snippet.html content=horizontal_form_example horizontal=true more=true %}
<div class="content">
<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>
{% include snippet.html content=field_label_example horizontal=true more=true %}
{% include anchor.html name="Variables" %}
<div class="content">
<p>
Form elements can be <strong>customized</strong> using the following generic variables. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
</p>
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</tfoot>
<tbody>
{% for key in page.variables_controls_keys %}
{% assign variable = site.data.variables.utilities.controls.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
{% for key in page.variables_form_keys %}
{% assign variable = site.data.variables.elements.form.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -1,8 +1,14 @@
---
title: Input
subtitle: "The <strong>text input</strong> and its variations"
layout: documentation
doc-tab: form
doc-subtab: input
breadcrumb:
- home
- documentation
- form
- form-input
variables_keys:
- input-color
- input-background-color
@@ -21,6 +27,10 @@ variables_keys:
- input-icon-color
- input-icon-active-color
- input-radius
meta:
colors: true
sizes: true
variables: true
---
{% capture input_example %}
@@ -239,288 +249,268 @@ variables_keys:
</div>
{% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Input</h1>
<h2 class="subtitle">
The <strong>text input</strong> and its variations
</h2>
{%
include meta.html
colors=true
sizes=true
variables=true
%}
<hr>
<div class="content">
<p>The following <strong>modifiers</strong> are supported:</p>
<ul>
<li>the <strong><a href="#colors">color</a></strong></li>
<li>the <strong><a href="#sizes">size</a></strong></li>
<li>the <strong><a href="#states">state</a></strong></li>
</ul>
<p>The following <a href="http://htmlreference.io/element/input/" target="_blank">type attributes</a> are supported:</p>
<ul>
<li><code>type="text"</code></li>
<li><code>type="password"</code></li>
<li><code>type="email"</code></li>
<li><code>type="tel"</code></li>
</ul>
</div>
<div class="columns">
<div class="column is-half">
{{input_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{input_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Colors" %}
<div class="columns">
<div class="column is-half">
{{colors_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{colors_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Sizes" %}
<div class="columns">
<div class="column is-half">
{{sizes_example}}
</div>
<div class="column is-half">
{% highlight html %}{{sizes_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Styles" %}
{% include elements/new-tag.html version="0.6.2" %}
<div class="columns">
<div class="column is-half">
{{ rounded_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ rounded_example }}{% endhighlight %}
</div>
</div>
{% include anchor.html name="States" %}
<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>
<div class="columns">
<div class="column is-half">
<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>
<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>
<h4 class="subtitle">Readonly and static inputs</h4>
<p style="margin-bottom: 0.5rem;">
<span class="tag is-success">New!</span>
<span class="tag is-info">0.5.3</span>
</p>
<div class="content">
<p>
If you use the <code>readonly</code> HTML attribute, the input will look similar to a normal one, but is not editable and has no shadow.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{ readonly_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ readonly_example }}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
If you <em>also</em> append the <code>is-static</code> modifier, it removes the background, border, shadow, and horizontal padding, while maintaining the <strong>vertical spacing</strong> so you can easily align the input in any context, like a horizontal form.
</p>
</div>
<div class="bd-example">
{{ static_example }}
</div>
{% highlight html %}{{ static_example }}{% endhighlight %}
<!-- Font Awesome Icons -->
{% include anchor.html name="With Font Awesome icons" %}
<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>
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>
<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>
{% include anchor.html name="Variables" %}
<div class="content">
<p>
You can use <a href="{{ site.data.meta.github | append: '/blob/master/sass/elements/form.sass#L1,L23' }}" target="_blank">these variables</a> to <strong>customize</strong> this element. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
</p>
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</tfoot>
<tbody>
{% for key in page.variables_keys %}
{% assign variable = site.data.variables.elements.form.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="content">
<p>The following <strong>modifiers</strong> are supported:</p>
<ul>
<li>the <strong><a href="#colors">color</a></strong></li>
<li>the <strong><a href="#sizes">size</a></strong></li>
<li>the <strong><a href="#states">state</a></strong></li>
</ul>
<p>The following <a href="http://htmlreference.io/element/input/" target="_blank">type attributes</a> are supported:</p>
<ul>
<li><code>type="text"</code></li>
<li><code>type="password"</code></li>
<li><code>type="email"</code></li>
<li><code>type="tel"</code></li>
</ul>
</div>
<div class="columns">
<div class="column is-half">
{{input_example}}
</div>
</section>
<div class="column is-half highlight-full">
{% highlight html %}{{input_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Colors" %}
<div class="columns">
<div class="column is-half">
{{colors_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{colors_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Sizes" %}
<div class="columns">
<div class="column is-half">
{{sizes_example}}
</div>
<div class="column is-half">
{% highlight html %}{{sizes_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Styles" %}
{% include elements/new-tag.html version="0.6.2" %}
<div class="columns">
<div class="column is-half">
{{ rounded_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ rounded_example }}{% endhighlight %}
</div>
</div>
{% include anchor.html name="States" %}
<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>
<div class="columns">
<div class="column is-half">
<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>
<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>
<h4 class="subtitle">Readonly and static inputs</h4>
<p style="margin-bottom: 0.5rem;">
<span class="tag is-success">New!</span>
<span class="tag is-info">0.5.3</span>
</p>
<div class="content">
<p>
If you use the <code>readonly</code> HTML attribute, the input will look similar to a normal one, but is not editable and has no shadow.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{ readonly_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ readonly_example }}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
If you <em>also</em> append the <code>is-static</code> modifier, it removes the background, border, shadow, and horizontal padding, while maintaining the <strong>vertical spacing</strong> so you can easily align the input in any context, like a horizontal form.
</p>
</div>
<div class="bd-example">
{{ static_example }}
</div>
{% highlight html %}{{ static_example }}{% endhighlight %}
<!-- Font Awesome Icons -->
{% include anchor.html name="With Font Awesome icons" %}
<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>
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>
<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>
{% include anchor.html name="Variables" %}
<div class="content">
<p>
You can use <a href="{{ site.data.meta.github | append: '/blob/master/sass/elements/form.sass#L1,L23' }}" target="_blank">these variables</a> to <strong>customize</strong> this element. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
</p>
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Default value</th>
</tr>
</tfoot>
<tbody>
{% for key in page.variables_keys %}
{% assign variable = site.data.variables.elements.form.vars[key] %}
<tr>
<td>
<code>{{ variable.name }}</code>
</td>
<td>
<code>{{ variable.value }}</code>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -1,8 +1,18 @@
---
title: Radio button
subtitle: "The mutually exclusive <strong>radio buttons</strong> in their native format"
layout: documentation
doc-tab: form
doc-subtab: radio
breadcrumb:
- home
- documentation
- form
- form-radio
meta:
colors: false
sizes: false
variables: false
---
{% capture radio_example %}
@@ -48,69 +58,50 @@ doc-subtab: radio
</div>
{% endcapture %}
{% include subnav/subnav-form.html %}
<div class="content">
<p>
The <code>radio</code> class is a simple wrapper around the <code>&lt;input type="radio"&gt;</code> HTML elements. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
</p>
<p>
Make sure the linked radio buttons have the <strong>same value</strong> for their <code>name</code> HTML attribute.
</p>
</div>
<section class="section">
<div class="container">
<h1 class="title">Radio</h1>
<h2 class="subtitle">
The mutually exclusive <strong>radio buttons</strong> in their native format
</h2>
{%
include meta.html
colors=false
sizes=false
variables=false
%}
<hr>
<div class="content">
<p>
The <code>radio</code> class is a simple wrapper around the <code>&lt;input type="radio"&gt;</code> HTML elements. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
</p>
<p>
Make sure the linked radio buttons have the <strong>same value</strong> for their <code>name</code> HTML attribute.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{radio_example}}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
You can check a radio button by <strong>default</strong> by adding the <code>checked</code> HTML attribute to the <code>&lt;input&gt;</code> element.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_default_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{radio_default_example}}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
You can add <strong>disable</strong> a radio button by adding the <code>disabled</code> HTML attribute to both the <code>&lt;label&gt;</code> and the <code>&lt;input&gt;</code>.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_disabled_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{radio_disabled_example}}{% endhighlight %}
</div>
</div>
<div class="columns">
<div class="column is-half">
{{radio_example}}
</div>
</section>
<div class="column is-half highlight-full">
{% highlight html %}{{radio_example}}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
You can check a radio button by <strong>default</strong> by adding the <code>checked</code> HTML attribute to the <code>&lt;input&gt;</code> element.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_default_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{radio_default_example}}{% endhighlight %}
</div>
</div>
<div class="content">
<p>
You can add <strong>disable</strong> a radio button by adding the <code>disabled</code> HTML attribute to both the <code>&lt;label&gt;</code> and the <code>&lt;input&gt;</code>.
</p>
</div>
<div class="columns">
<div class="column is-half">
{{radio_disabled_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{radio_disabled_example}}{% endhighlight %}
</div>
</div>

View File

@@ -1,8 +1,18 @@
---
title: Select
subtitle: "The browser built-in <strong>select dropdown</strong>, styled accordingly"
layout: documentation
doc-tab: form
doc-subtab: select
breadcrumb:
- home
- documentation
- form
- form-select
meta:
colors: true
sizes: true
variables: false
---
{% capture select_example %}
@@ -270,205 +280,185 @@ doc-subtab: select
</div>
{% endcapture %}
{% include subnav/subnav-form.html %}
<section class="section">
<div class="container">
<h1 class="title">Select</h1>
<h2 class="subtitle">
The browser built-in <strong>select dropdown</strong>, styled accordingly
</h2>
{%
include meta.html
colors=true
sizes=true
variables=false
%}
<hr>
<div class="content">
<p>The following <strong>modifiers</strong> are supported:</p>
<ul>
<li>the <strong><a href="#select-color">color</a></strong></li>
<li>the <strong><a href="#select-size">size</a></strong></li>
<li>the <strong><a href="#select-state">state</a></strong></li>
</ul>
</div>
<div class="columns">
<div class="column is-half">
{{select_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{select_example}}{% endhighlight %}
</div>
</div>
<hr>
<h3 class="title">Multiple select</h3>
<div class="columns">
<div class="column is-half">
<div class="content">
<p>
You can style a <strong>multiple select</strong> dropdown, by using the <code>is-multiple</code> modifier, and by using the <code>multiple</code> HTML attribute.
</p>
</div>
{{select_multiple_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{select_multiple_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Colors" %}
<div class="columns">
<div class="column is-half">
{{colors_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{colors_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Styles" %}
{% include elements/new-tag.html version="0.6.2" %}
<div class="columns">
<div class="column is-half">
{{ rounded_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ rounded_example }}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Sizes" %}
<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 id="select-state" 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>
<!-- Font Awesome Icons -->
<hr>
<h3 id="input-with-icons" class="title">With icons</h3>
<div class="content">
<p>You can append the <strong>modifier</strong> on a control:</p>
<ul>
<li>
<code>has-icons-left</code>
</li>
</ul>
<p>You also need to add a modifier on the <strong>icon</strong>:</p>
<ul>
<li>
<code>icon is-left</code> since <code>has-icons-left</code> is used
</li>
</ul>
<p>The size of the <strong>select</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>
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>
<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>
<div class="content">
<p>The following <strong>modifiers</strong> are supported:</p>
<ul>
<li>the <strong><a href="#select-color">color</a></strong></li>
<li>the <strong><a href="#select-size">size</a></strong></li>
<li>the <strong><a href="#select-state">state</a></strong></li>
</ul>
</div>
<div class="columns">
<div class="column is-half">
{{select_example}}
</div>
</section>
<div class="column is-half highlight-full">
{% highlight html %}{{select_example}}{% endhighlight %}
</div>
</div>
<hr>
<h3 class="title">Multiple select</h3>
<div class="columns">
<div class="column is-half">
<div class="content">
<p>
You can style a <strong>multiple select</strong> dropdown, by using the <code>is-multiple</code> modifier, and by using the <code>multiple</code> HTML attribute.
</p>
</div>
{{select_multiple_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{select_multiple_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Colors" %}
<div class="columns">
<div class="column is-half">
{{colors_example}}
</div>
<div class="column is-half highlight-full">
{% highlight html %}{{colors_example}}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Styles" %}
{% include elements/new-tag.html version="0.6.2" %}
<div class="columns">
<div class="column is-half">
{{ rounded_example }}
</div>
<div class="column is-half">
{% highlight html %}{{ rounded_example }}{% endhighlight %}
</div>
</div>
{% include anchor.html name="Sizes" %}
<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 id="select-state" 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>
<!-- Font Awesome Icons -->
<hr>
<h3 id="input-with-icons" class="title">With icons</h3>
<div class="content">
<p>You can append the <strong>modifier</strong> on a control:</p>
<ul>
<li>
<code>has-icons-left</code>
</li>
</ul>
<p>You also need to add a modifier on the <strong>icon</strong>:</p>
<ul>
<li>
<code>icon is-left</code> since <code>has-icons-left</code> is used
</li>
</ul>
<p>The size of the <strong>select</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>
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>
<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>

View File

@@ -1,8 +1,18 @@
---
title: Textarea
subtitle: "The multiline <strong>textarea</strong> and its variations"
layout: documentation
doc-tab: form
doc-subtab: textarea
breadcrumb:
- home
- documentation
- form
- form-textarea
meta:
colors: true
sizes: true
variables: false
---
{% capture textarea_example %}
@@ -123,91 +133,71 @@ doc-subtab: textarea
</div>
{% endcapture %}
{% include subnav/subnav-form.html %}
{% include snippet.html content=textarea_example %}
<section class="section">
<div class="container">
<h1 class="title">Textarea</h1>
<h2 class="subtitle">
The multiline <strong>textarea</strong> and its variations
</h2>
{%
include meta.html
colors=true
sizes=true
variables=false
%}
<div class="content">
<p>
You can set the height of the textarea using the `rows` HTML attribute.
</p>
</div>
<hr>
{% include snippet.html content=textarea_rows_example %}
{% include snippet.html content=textarea_example %}
{% include anchor.html name="Colors" %}
{% include snippet.html content=colors_example %}
{% include anchor.html name="Sizes" %}
{% include snippet.html content=sizes_example %}
{% include anchor.html name="States" %}
<h4 class="subtitle">Normal</h4>
{% include snippet.html content=normal_example %}
<h4 class="subtitle">Hover</h4>
{% include snippet.html content=hover_example %}
<h4 class="subtitle">Focus</h4>
{% include snippet.html content=focus_example %}
<h4 class="subtitle">Loading</h4>
{% include snippet.html content=loading_example %}
<div class="columns">
<div class="column is-half">
<div class="content">
<p>
You can set the height of the textarea using the `rows` HTML attribute.
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>
{% include snippet.html content=textarea_rows_example %}
{% include anchor.html name="Colors" %}
{% include snippet.html content=colors_example %}
{% include anchor.html name="Sizes" %}
{% include snippet.html content=sizes_example %}
{% include anchor.html name="States" %}
<h4 class="subtitle">Normal</h4>
{% include snippet.html content=normal_example %}
<h4 class="subtitle">Hover</h4>
{% include snippet.html content=hover_example %}
<h4 class="subtitle">Focus</h4>
{% include snippet.html content=focus_example %}
<h4 class="subtitle">Loading</h4>
{% include snippet.html content=loading_example %}
<div class="columns">
<div class="column is-half">
<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-full">
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
</div>
</div>
<h4 class="subtitle">Disabled</h4>
{% include snippet.html content=disabled_example %}
<h4 class="subtitle">Readonly</h4>
<div class="tags has-addons">
<span class="tag">New</span>
<span class="tag is-info">0.5.3</span>
</div>
<div class="content">
<p>
If you use the <code>readonly</code> HTML attribute, the textarea will look similar to a normal one, but is not editable and has no shadow.
</p>
</div>
{% include snippet.html content=readonly_example %}
{{loading_sizes_example}}
</div>
</section>
<div class="column is-half highlight-full">
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
</div>
</div>
<h4 class="subtitle">Disabled</h4>
{% include snippet.html content=disabled_example %}
<h4 class="subtitle">Readonly</h4>
<div class="tags has-addons">
<span class="tag">New</span>
<span class="tag is-info">0.5.3</span>
</div>
<div class="content">
<p>
If you use the <code>readonly</code> HTML attribute, the textarea will look similar to a normal one, but is not editable and has no shadow.
</p>
</div>
{% include snippet.html content=readonly_example %}