mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
Container broken layout
This commit is contained in:
parent
f0074aa339
commit
25d0ea1136
@ -36,6 +36,38 @@
|
|||||||
"name": "Sizes",
|
"name": "Sizes",
|
||||||
"path": "/documentation/columns/sizes"
|
"path": "/documentation/columns/sizes"
|
||||||
},
|
},
|
||||||
|
"form": {
|
||||||
|
"name": "Form",
|
||||||
|
"path": "/documentation/form"
|
||||||
|
},
|
||||||
|
"form-general": {
|
||||||
|
"name": "General",
|
||||||
|
"path": "/documentation/form/general"
|
||||||
|
},
|
||||||
|
"form-input": {
|
||||||
|
"name": "Input",
|
||||||
|
"path": "/documentation/form/input"
|
||||||
|
},
|
||||||
|
"form-textarea": {
|
||||||
|
"name": "Textarea",
|
||||||
|
"path": "/documentation/form/textarea"
|
||||||
|
},
|
||||||
|
"form-select": {
|
||||||
|
"name": "Select",
|
||||||
|
"path": "/documentation/form/select"
|
||||||
|
},
|
||||||
|
"form-checkbox": {
|
||||||
|
"name": "Checkbox",
|
||||||
|
"path": "/documentation/form/checkbox"
|
||||||
|
},
|
||||||
|
"form-radio": {
|
||||||
|
"name": "Radio",
|
||||||
|
"path": "/documentation/form/radio"
|
||||||
|
},
|
||||||
|
"form-file": {
|
||||||
|
"name": "File",
|
||||||
|
"path": "/documentation/form/file"
|
||||||
|
},
|
||||||
"elements": {
|
"elements": {
|
||||||
"name": "Elements",
|
"name": "Elements",
|
||||||
"path": "/documentation/elements"
|
"path": "/documentation/elements"
|
||||||
@ -131,6 +163,7 @@
|
|||||||
},
|
},
|
||||||
"order": {
|
"order": {
|
||||||
"columns": ["columns-basics", "columns-sizes", "columns-responsiveness", "columns-nesting", "columns-gap", "columns-options"],
|
"columns": ["columns-basics", "columns-sizes", "columns-responsiveness", "columns-nesting", "columns-gap", "columns-options"],
|
||||||
|
"form": ["form-general", "form-input", "form-textarea", "form-select", "form-checkbox", "form-radio", "form-file"],
|
||||||
"elements": ["elements-box", "elements-button", "elements-content", "elements-delete", "elements-icon", "elements-image", "elements-notification", "elements-progress", "elements-table", "elements-tag", "elements-title"],
|
"elements": ["elements-box", "elements-button", "elements-content", "elements-delete", "elements-icon", "elements-image", "elements-notification", "elements-progress", "elements-table", "elements-tag", "elements-title"],
|
||||||
"components": ["components-breadcrumb", "components-card", "components-dropdown", "components-menu", "components-message", "components-modal", "components-navbar", "components-pagination", "components-panel", "components-tabs"]
|
"components": ["components-breadcrumb", "components-card", "components-dropdown", "components-menu", "components-message", "components-modal", "components-navbar", "components-pagination", "components-panel", "components-tabs"]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div id="carboncontainer">
|
<div id="carboncontainer">
|
||||||
<div id="carbon" class="box">
|
<div id="carbon">
|
||||||
<script>
|
<script>
|
||||||
var _0xa6d2 = [
|
var _0xa6d2 = [
|
||||||
'\x73\x63\x72\x69\x70\x74',
|
'\x73\x63\x72\x69\x70\x74',
|
||||||
|
11
docs/_includes/layout/main-close.html
Normal file
11
docs/_includes/layout/main-close.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<aside class="bd-side">
|
||||||
|
{% if include.show_carbon %}
|
||||||
|
{% include carbon.html %}
|
||||||
|
{% endif %}
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
6
docs/_includes/layout/main-open.html
Normal file
6
docs/_includes/layout/main-open.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<main class="bd-main">
|
||||||
|
<div class="bd-side-background"></div>
|
||||||
|
<div class="bd-main-container container">
|
||||||
|
<div class="bd-duo">
|
||||||
|
<div class="bd-lead">
|
||||||
|
<div class="bd-content">
|
@ -80,6 +80,7 @@ route: documentation
|
|||||||
colors=page.meta.colors
|
colors=page.meta.colors
|
||||||
sizes=page.meta.sizes
|
sizes=page.meta.sizes
|
||||||
variables=page.meta.variables
|
variables=page.meta.variables
|
||||||
|
experimental=page.meta.experimental
|
||||||
%}
|
%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
@ -92,8 +93,10 @@ route: documentation
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="bd-side">
|
<aside class="bd-side">
|
||||||
{% include carbon.html %}
|
{% unless page.hide_carbon %}
|
||||||
|
{% include carbon.html %}
|
||||||
|
{% endunless %}
|
||||||
</aside>
|
</aside>
|
||||||
</aside>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -2,8 +2,12 @@ svg
|
|||||||
max-height: 100%
|
max-height: 100%
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|
||||||
$carbon-space: 15px
|
$carbon-spacing: 1rem
|
||||||
$carbon-width: 300px
|
$carbon-shadow-size: 0.75rem
|
||||||
|
$carbon-height: 100px
|
||||||
|
$carbon-image-height: 100px
|
||||||
|
$carbon-image-width: 130px
|
||||||
|
$carbon-poweredby-height: 20px
|
||||||
|
|
||||||
#carboncontainer
|
#carboncontainer
|
||||||
align-items: center
|
align-items: center
|
||||||
@ -12,16 +16,17 @@ $carbon-width: 300px
|
|||||||
margin-left: auto
|
margin-left: auto
|
||||||
margin-right: auto
|
margin-right: auto
|
||||||
max-width: $carbon-width
|
max-width: $carbon-width
|
||||||
min-height: 120px + ($carbon-space * 2)
|
min-height: 120px
|
||||||
min-width: 280px
|
min-width: 280px
|
||||||
|
|
||||||
#carbon
|
#carbon
|
||||||
flex-grow: 1
|
flex-grow: 1
|
||||||
min-height: 100px + ($carbon-space * 2)
|
min-height: $carbon-height
|
||||||
padding: 0
|
padding: 0
|
||||||
position: relative
|
position: relative
|
||||||
&:hover
|
&:hover
|
||||||
box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $primary
|
background-color: $white
|
||||||
|
box-shadow: 0 0 0 $carbon-shadow-size $white
|
||||||
+tablet
|
+tablet
|
||||||
width: $carbon-width
|
width: $carbon-width
|
||||||
|
|
||||||
@ -32,36 +37,44 @@ $carbon-width: 300px
|
|||||||
span
|
span
|
||||||
display: block
|
display: block
|
||||||
.carbon-wrap
|
.carbon-wrap
|
||||||
min-height: 130px
|
min-height: $carbon-height
|
||||||
position: relative
|
position: relative
|
||||||
|
&:hover
|
||||||
|
.carbon-img
|
||||||
|
opacity: 0.9
|
||||||
.carbon-img
|
.carbon-img
|
||||||
bottom: 0
|
bottom: 0
|
||||||
float: left
|
float: left
|
||||||
left: 0
|
left: 0
|
||||||
min-height: 130px
|
min-height: $carbon-height
|
||||||
padding: 15px 0 15px 15px
|
padding: 0
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0
|
top: 0
|
||||||
width: 145px
|
width: calc(#{$carbon-image-width} + #{$carbon-spacing})
|
||||||
img
|
img
|
||||||
display: block
|
display: block
|
||||||
height: 100px
|
height: $carbon-image-height
|
||||||
width: 130px
|
width: $carbon-image-width
|
||||||
&:hover
|
&:hover
|
||||||
opacity: 0.9
|
& + .carbon-text
|
||||||
|
color: $link
|
||||||
&:active
|
&:active
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
a:hover
|
|
||||||
text-decoration: underline
|
|
||||||
.carbon-text
|
.carbon-text
|
||||||
display: block
|
display: block
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
line-height: 20px
|
line-height: 20px
|
||||||
padding: 15px 15px 35px 160px
|
min-height: $carbon-height
|
||||||
|
padding: 0 0 $carbon-poweredby-height calc(#{$carbon-image-width} + #{$carbon-spacing})
|
||||||
|
&:hover
|
||||||
|
color: $link
|
||||||
.carbon-poweredby
|
.carbon-poweredby
|
||||||
bottom: 10px
|
bottom: 0
|
||||||
color: $text-light
|
color: $text-light
|
||||||
display: inline
|
display: inline
|
||||||
font-size: $size-small
|
font-size: $size-small
|
||||||
|
line-height: $carbon-poweredby-height
|
||||||
position: absolute
|
position: absolute
|
||||||
right: 10px
|
right: 0
|
||||||
|
&:hover
|
||||||
|
text-decoration: underline
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
.bd-prev-next
|
.bd-prev-next
|
||||||
display: flex
|
display: flex
|
||||||
.bd-side
|
.bd-side
|
||||||
flex: 0 0 300px
|
flex: 0 0 calc(#{$carbon-width} + 1.5rem)
|
||||||
|
|
||||||
+desktop
|
+desktop
|
||||||
.bd-main
|
.bd-main
|
||||||
|
@ -12,6 +12,8 @@ $bleeding-red: #CA1F26
|
|||||||
$star: #FFD257
|
$star: #FFD257
|
||||||
$rss: #f26522
|
$rss: #f26522
|
||||||
|
|
||||||
|
$carbon-width: 300px
|
||||||
|
|
||||||
@import "../bulma"
|
@import "../bulma"
|
||||||
@import "./_sass/main"
|
@import "./_sass/main"
|
||||||
@import "./_sass/highlight"
|
@import "./_sass/highlight"
|
||||||
|
@ -9582,7 +9582,7 @@ label.panel-block:hover {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.bd-side {
|
.bd-side {
|
||||||
flex: 0 0 300px;
|
flex: 0 0 calc(300px + 1.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9879,19 +9879,20 @@ svg {
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
min-height: 150px;
|
min-height: 120px;
|
||||||
min-width: 280px;
|
min-width: 280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbon {
|
#carbon {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-height: 130px;
|
min-height: 100px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbon:hover {
|
#carbon:hover {
|
||||||
box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px #00d1b2;
|
background-color: white;
|
||||||
|
box-shadow: 0 0 0 0.75rem white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 769px), print {
|
@media screen and (min-width: 769px), print {
|
||||||
@ -9911,19 +9912,23 @@ svg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#carbonads .carbon-wrap {
|
#carbonads .carbon-wrap {
|
||||||
min-height: 130px;
|
min-height: 100px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#carbonads .carbon-wrap:hover .carbon-img {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
#carbonads .carbon-img {
|
#carbonads .carbon-img {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
float: left;
|
float: left;
|
||||||
left: 0;
|
left: 0;
|
||||||
min-height: 130px;
|
min-height: 100px;
|
||||||
padding: 15px 0 15px 15px;
|
padding: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 145px;
|
width: calc(130px + 1rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbonads .carbon-img img {
|
#carbonads .carbon-img img {
|
||||||
@ -9932,32 +9937,38 @@ svg {
|
|||||||
width: 130px;
|
width: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbonads .carbon-img:hover {
|
#carbonads .carbon-img:hover + .carbon-text {
|
||||||
opacity: 0.9;
|
color: #3273dc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbonads .carbon-img:active {
|
#carbonads .carbon-img:active {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbonads a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#carbonads .carbon-text {
|
#carbonads .carbon-text {
|
||||||
display: block;
|
display: block;
|
||||||
color: #363636;
|
color: #363636;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
padding: 15px 15px 35px 160px;
|
min-height: 100px;
|
||||||
|
padding: 0 0 20px calc(130px + 1rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
#carbonads .carbon-text:hover {
|
||||||
|
color: #3273dc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#carbonads .carbon-poweredby {
|
#carbonads .carbon-poweredby {
|
||||||
bottom: 10px;
|
bottom: 0;
|
||||||
color: #7a7a7a;
|
color: #7a7a7a;
|
||||||
display: inline;
|
display: inline;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
|
line-height: 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#carbonads .carbon-poweredby:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro-content {
|
.intro-content {
|
||||||
|
9
docs/documentation/form.html
Normal file
9
docs/documentation/form.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
title: Form
|
||||||
|
subtitle: "All <strong>form controls</strong>"
|
||||||
|
layout: documentation
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
---
|
@ -1,8 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: Checkbox
|
title: Checkbox
|
||||||
|
subtitle: "The 2-state <strong>checkbox</strong> in its native format"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: checkbox
|
doc-subtab: checkbox
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-checkbox
|
||||||
|
meta:
|
||||||
|
colors: false
|
||||||
|
sizes: false
|
||||||
|
variables: false
|
||||||
---
|
---
|
||||||
|
|
||||||
{% capture checkbox_example %}
|
{% capture checkbox_example %}
|
||||||
@ -26,60 +36,41 @@ doc-subtab: checkbox
|
|||||||
</label>
|
</label>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-form.html %}
|
<div class="content">
|
||||||
|
<p>
|
||||||
|
The <code>checkbox</code> class is a simple wrapper around the <code><input type="checkbox"></code> HTML element. It is intentionally not styled, to preserve cross-browser compatibility and the user experience.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section class="section">
|
<div class="columns">
|
||||||
<div class="container">
|
<div class="column is-half">
|
||||||
<h1 class="title">Checkbox</h1>
|
{{checkbox_example}}
|
||||||
<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><input type="checkbox"></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>
|
</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>
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
---
|
---
|
||||||
title: File upload
|
title: File upload
|
||||||
|
subtitle: "A custom <strong>file upload</strong> input, without JavaScript"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: file
|
doc-subtab: file
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-file
|
||||||
file_name: "Screen Shot 2017-07-29 at 15.54.25.png"
|
file_name: "Screen Shot 2017-07-29 at 15.54.25.png"
|
||||||
variables_keys:
|
variables_keys:
|
||||||
- file-border-color
|
- file-border-color
|
||||||
@ -15,6 +21,11 @@ variables_keys:
|
|||||||
- file-name-border-style
|
- file-name-border-style
|
||||||
- file-name-border-width
|
- file-name-border-width
|
||||||
- file-name-max-width
|
- file-name-max-width
|
||||||
|
meta:
|
||||||
|
experimental: true
|
||||||
|
colors: true
|
||||||
|
sizes: true
|
||||||
|
variables: true
|
||||||
---
|
---
|
||||||
|
|
||||||
{% capture file %}
|
{% capture file %}
|
||||||
@ -527,253 +538,231 @@ variables_keys:
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-form.html %}
|
<div class="content">
|
||||||
|
<p>
|
||||||
<section class="section">
|
The <code>.file</code> element is a simple <strong>interactive label</strong> that wraps an <code><input type="file"></code>. It comprises several sub-elements:
|
||||||
<div class="container">
|
</p>
|
||||||
<h1 class="title">File upload</h1>
|
<ul>
|
||||||
<h2 class="subtitle">
|
<li>
|
||||||
A custom <strong>file upload</strong> input, without JavaScript
|
<code>.file</code> the main <strong>container</strong>
|
||||||
</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><input type="file"></code>. It comprises several sub-elements:
|
|
||||||
</p>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<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>
|
<ul>
|
||||||
<li>
|
<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>
|
<ul>
|
||||||
<li>
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<code>.file-cta</code> the upload <strong>call-to-action</strong>
|
<code>.file-label</code> the "Choose a file…" text
|
||||||
<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
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>.file-name</code> a container for the <strong>chosen file</strong> name
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% include snippet.html content=file %}
|
{% include snippet.html content=file %}
|
||||||
|
|
||||||
{% include anchor.html name="Modifiers" %}
|
{% 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" %}
|
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>
|
<p>
|
||||||
You can style the file element by appending one of the <strong>{{ site.data.colors.derived | size }} color modifiers</strong>:
|
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>
|
|
||||||
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="bd-example">
|
||||||
{% include anchor.html name="Variables" %}
|
{{ file_name }}
|
||||||
|
|
||||||
<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>
|
</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>
|
</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>
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
---
|
---
|
||||||
title: Form controls
|
title: Form controls
|
||||||
|
subtitle: "All generic <strong>form controls</strong>, designed for consistency"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: general
|
doc-subtab: general
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-general
|
||||||
variables_controls_keys:
|
variables_controls_keys:
|
||||||
- control-radius
|
- control-radius
|
||||||
- control-radius-small
|
- control-radius-small
|
||||||
@ -795,292 +801,278 @@ variables_form_keys:
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% 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">
|
{% include snippet.html content=example more=true %}
|
||||||
<div class="container">
|
|
||||||
<h1 class="title">Form controls</h1>
|
|
||||||
<h2 class="subtitle">
|
|
||||||
All generic <strong>form controls</strong>, designed for consistency
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<hr>
|
{% include anchor.html name="Form field" %}
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>The following form controls <strong>classes</strong> are supported:</p>
|
<p>The <code>field</code> container is a simple container for:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>.label</code></li>
|
<li>a text <code>label</code></li>
|
||||||
<li><code>.input</code></li>
|
<li>a form <code>control</code></li>
|
||||||
<li><code>.textarea</code></li>
|
<li>an optional <code>help</code>text</li>
|
||||||
<li><code>.select</code></li>
|
</ul>
|
||||||
<li><code>.checkbox</code></li>
|
</div>
|
||||||
<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>
|
|
||||||
|
|
||||||
{% 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">
|
{% include snippet.html content=fields_example %}
|
||||||
<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=field_example %}
|
{% include anchor.html name="Form control" %}
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
|
<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>
|
||||||
</div>
|
<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">
|
{% include snippet.html content=control_button_example %}
|
||||||
<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_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 -->
|
<div class="content">
|
||||||
{% include anchor.html name="With icons" %}
|
<p>
|
||||||
|
You can append icons to <strong>select dropdowns</strong> as well.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
{% include snippet.html content=select_icons_example %}
|
||||||
<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=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">
|
{% include snippet.html content=has_icons_small_example %}
|
||||||
<p>
|
|
||||||
You can append icons to <strong>select dropdowns</strong> as well.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include snippet.html content=select_icons_example %}
|
{% include snippet.html content=has_icons_normal_example clipped=true %}
|
||||||
|
|
||||||
<div class="content">
|
{% include snippet.html content=has_icons_medium_example clipped=true %}
|
||||||
<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_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">
|
<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>
|
<p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include snippet.html content=addons_example %}
|
{% include snippet.html content=addons_static_example %}
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
|
<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>
|
||||||
|
|
||||||
<div class="content">
|
{% include snippet.html content=addons_expanded_example horizontal=true more=true %}
|
||||||
<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_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">
|
{% include snippet.html content=addons_expanded_fullwidth_example %}
|
||||||
<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_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">
|
{% include snippet.html content=addons_center_example %}
|
||||||
<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_expanded_fullwidth_example %}
|
{% include snippet.html content=addons_right_example %}
|
||||||
|
|
||||||
<div class="content">
|
{% include anchor.html name="Form group" %}
|
||||||
<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 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">
|
{% include snippet.html content=group_centered_example %}
|
||||||
<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_example %}
|
{% include snippet.html content=group_right_example %}
|
||||||
|
|
||||||
<div class="content">
|
<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>
|
||||||
</p>
|
Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong> with.
|
||||||
</div>
|
</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">
|
{% include snippet.html content=group_multiline_example clipped=true %}
|
||||||
<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>
|
|
||||||
|
|
||||||
|
<div class="message is-info">
|
||||||
|
<div class="message-header">
|
||||||
|
<p>List of buttons</p>
|
||||||
</div>
|
</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>
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
---
|
---
|
||||||
title: Input
|
title: Input
|
||||||
|
subtitle: "The <strong>text input</strong> and its variations"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: input
|
doc-subtab: input
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-input
|
||||||
variables_keys:
|
variables_keys:
|
||||||
- input-color
|
- input-color
|
||||||
- input-background-color
|
- input-background-color
|
||||||
@ -21,6 +27,10 @@ variables_keys:
|
|||||||
- input-icon-color
|
- input-icon-color
|
||||||
- input-icon-active-color
|
- input-icon-active-color
|
||||||
- input-radius
|
- input-radius
|
||||||
|
meta:
|
||||||
|
colors: true
|
||||||
|
sizes: true
|
||||||
|
variables: true
|
||||||
---
|
---
|
||||||
|
|
||||||
{% capture input_example %}
|
{% capture input_example %}
|
||||||
@ -239,288 +249,268 @@ variables_keys:
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-form.html %}
|
<div class="content">
|
||||||
|
<p>The following <strong>modifiers</strong> are supported:</p>
|
||||||
<section class="section">
|
<ul>
|
||||||
<div class="container">
|
<li>the <strong><a href="#colors">color</a></strong></li>
|
||||||
<h1 class="title">Input</h1>
|
<li>the <strong><a href="#sizes">size</a></strong></li>
|
||||||
<h2 class="subtitle">
|
<li>the <strong><a href="#states">state</a></strong></li>
|
||||||
The <strong>text input</strong> and its variations
|
</ul>
|
||||||
</h2>
|
<p>The following <a href="http://htmlreference.io/element/input/" target="_blank">type attributes</a> are supported:</p>
|
||||||
{%
|
<ul>
|
||||||
include meta.html
|
<li><code>type="text"</code></li>
|
||||||
colors=true
|
<li><code>type="password"</code></li>
|
||||||
sizes=true
|
<li><code>type="email"</code></li>
|
||||||
variables=true
|
<li><code>type="tel"</code></li>
|
||||||
%}
|
</ul>
|
||||||
|
</div>
|
||||||
<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="columns">
|
||||||
|
<div class="column is-half">
|
||||||
|
{{input_example}}
|
||||||
</div>
|
</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>
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: Radio button
|
title: Radio button
|
||||||
|
subtitle: "The mutually exclusive <strong>radio buttons</strong> in their native format"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: radio
|
doc-subtab: radio
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-radio
|
||||||
|
meta:
|
||||||
|
colors: false
|
||||||
|
sizes: false
|
||||||
|
variables: false
|
||||||
---
|
---
|
||||||
|
|
||||||
{% capture radio_example %}
|
{% capture radio_example %}
|
||||||
@ -48,69 +58,50 @@ doc-subtab: radio
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-form.html %}
|
<div class="content">
|
||||||
|
<p>
|
||||||
|
The <code>radio</code> class is a simple wrapper around the <code><input type="radio"></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="columns">
|
||||||
<div class="container">
|
<div class="column is-half">
|
||||||
<h1 class="title">Radio</h1>
|
{{radio_example}}
|
||||||
<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><input type="radio"></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><input></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><label></code> and the <code><input></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>
|
</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><input></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><label></code> and the <code><input></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>
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: Select
|
title: Select
|
||||||
|
subtitle: "The browser built-in <strong>select dropdown</strong>, styled accordingly"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: select
|
doc-subtab: select
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-select
|
||||||
|
meta:
|
||||||
|
colors: true
|
||||||
|
sizes: true
|
||||||
|
variables: false
|
||||||
---
|
---
|
||||||
|
|
||||||
{% capture select_example %}
|
{% capture select_example %}
|
||||||
@ -270,205 +280,185 @@ doc-subtab: select
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-form.html %}
|
<div class="content">
|
||||||
|
<p>The following <strong>modifiers</strong> are supported:</p>
|
||||||
<section class="section">
|
<ul>
|
||||||
<div class="container">
|
<li>the <strong><a href="#select-color">color</a></strong></li>
|
||||||
<h1 class="title">Select</h1>
|
<li>the <strong><a href="#select-size">size</a></strong></li>
|
||||||
<h2 class="subtitle">
|
<li>the <strong><a href="#select-state">state</a></strong></li>
|
||||||
The browser built-in <strong>select dropdown</strong>, styled accordingly
|
</ul>
|
||||||
</h2>
|
</div>
|
||||||
{%
|
|
||||||
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="columns">
|
||||||
|
<div class="column is-half">
|
||||||
|
{{select_example}}
|
||||||
</div>
|
</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>
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: Textarea
|
title: Textarea
|
||||||
|
subtitle: "The multiline <strong>textarea</strong> and its variations"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
doc-tab: form
|
doc-tab: form
|
||||||
doc-subtab: textarea
|
doc-subtab: textarea
|
||||||
|
breadcrumb:
|
||||||
|
- home
|
||||||
|
- documentation
|
||||||
|
- form
|
||||||
|
- form-textarea
|
||||||
|
meta:
|
||||||
|
colors: true
|
||||||
|
sizes: true
|
||||||
|
variables: false
|
||||||
---
|
---
|
||||||
|
|
||||||
{% capture textarea_example %}
|
{% capture textarea_example %}
|
||||||
@ -123,91 +133,71 @@ doc-subtab: textarea
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-form.html %}
|
{% include snippet.html content=textarea_example %}
|
||||||
|
|
||||||
<section class="section">
|
<div class="content">
|
||||||
<div class="container">
|
<p>
|
||||||
<h1 class="title">Textarea</h1>
|
You can set the height of the textarea using the `rows` HTML attribute.
|
||||||
<h2 class="subtitle">
|
</p>
|
||||||
The multiline <strong>textarea</strong> and its variations
|
</div>
|
||||||
</h2>
|
|
||||||
{%
|
|
||||||
include meta.html
|
|
||||||
colors=true
|
|
||||||
sizes=true
|
|
||||||
variables=false
|
|
||||||
%}
|
|
||||||
|
|
||||||
<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">
|
<div class="content">
|
||||||
<p>
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
{{loading_sizes_example}}
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
</div>
|
</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 %}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: Container
|
title: Container
|
||||||
|
subtitle: "A simple <strong>container</strong> to center your content horizontally"
|
||||||
layout: documentation
|
layout: documentation
|
||||||
|
hide_carbon: true
|
||||||
doc-tab: layout
|
doc-tab: layout
|
||||||
doc-subtab: container
|
doc-subtab: container
|
||||||
---
|
---
|
||||||
@ -38,82 +40,77 @@ doc-subtab: container
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% include subnav/subnav-layout.html %}
|
<div class="content">
|
||||||
|
<p>The <code>.container</code> class can be used in any context, but mostly as a <strong>direct child</strong> of either:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>.navbar</code></li>
|
||||||
|
<li><code>.hero</code></li>
|
||||||
|
<li><code>.section</code></li>
|
||||||
|
<li><code>.footer</code></li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
The containers <strong>width</strong> for each <strong>breakpoint</strong> is the result
|
||||||
|
of: <code>$device - (2 * $gap)</code>. The <code>$gap</code> variable has a default value of <code>
|
||||||
|
32px</code> but can be modified.
|
||||||
|
</p>
|
||||||
|
<p>This is how the container will behave:</p>
|
||||||
|
<ul>
|
||||||
|
<li>on <code>$desktop</code> it will have a maximum width of <strong>960px</strong>.</li>
|
||||||
|
<li>on <code>$widescreen</code> it will have a maximum width of <strong>1152px</strong>.</li>
|
||||||
|
<li>on <code>$fullhd</code> it will have a maximum width of <strong>1344px</strong>.</li>
|
||||||
|
</ul>
|
||||||
|
<p>The values <strong>960</strong>, <strong>1152</strong> and <strong>1344</strong> have been chosen because they are divisible by both <strong>12</strong> and <strong>16</strong>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section class="section">
|
{% include layout/main-close.html show_carbon=true %}
|
||||||
<div class="container">
|
|
||||||
<h1 class="title">Container</h1>
|
|
||||||
<h2 class="subtitle">
|
|
||||||
A simple <strong>container</strong> to center your content horizontally
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<p>The <code>.container</code> class can be used in any context, but mostly as a <strong>direct child</strong> of either:</p>
|
|
||||||
<ul>
|
|
||||||
<li><code>.navbar</code></li>
|
|
||||||
<li><code>.hero</code></li>
|
|
||||||
<li><code>.section</code></li>
|
|
||||||
<li><code>.footer</code></li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
The containers <strong>width</strong> for each <strong>breakpoint</strong> is the result
|
|
||||||
of: <code>$device - (2 * $gap)</code>. The <code>$gap</code> variable has a default value of <code>
|
|
||||||
32px</code> but can be modified.
|
|
||||||
</p>
|
|
||||||
<p>This is how the container will behave:</p>
|
|
||||||
<ul>
|
|
||||||
<li>on <code>$desktop</code> it will have a maximum width of <strong>960px</strong>.</li>
|
|
||||||
<li>on <code>$widescreen</code> it will have a maximum width of <strong>1152px</strong>.</li>
|
|
||||||
<li>on <code>$fullhd</code> it will have a maximum width of <strong>1344px</strong>.</li>
|
|
||||||
</ul>
|
|
||||||
<p>The values <strong>960</strong>, <strong>1152</strong> and <strong>1344</strong> have been chosen because they are divisible by both <strong>12</strong> and <strong>16</strong>.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="bd-example is-fullwidth">
|
<div class="bd-example is-fullwidth">
|
||||||
{{container_example}}
|
{{container_example}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% highlight html %}{{container_example}}{% endhighlight %}
|
{% include layout/main-open.html %}
|
||||||
|
|
||||||
<section class="section">
|
{% highlight html %}{{ container_example }}{% endhighlight %}
|
||||||
<div class="container">
|
|
||||||
<h3 class="title is-4">Fluid container</h3>
|
<h3 class="title is-4">Fluid container</h3>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>If you don't want to have a maximum width but want to keep the 32px margin on the left and
|
<p>If you don't want to have a maximum width but want to keep the 32px margin on the left and
|
||||||
right sides, add the <code>is-fluid</code> modifier:</p>
|
right sides, add the <code>is-fluid</code> modifier:</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
{% include layout/main-close.html %}
|
||||||
|
|
||||||
<div class="bd-example is-fullwidth">
|
<div class="bd-example is-fullwidth">
|
||||||
{{container_fluid_example}}
|
{{container_fluid_example}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% highlight html %}{{container_fluid_example}}{% endhighlight %}
|
{% include layout/main-open.html %}
|
||||||
|
|
||||||
<section class="section">
|
{% highlight html %}{{ container_fluid_example }}{% endhighlight %}
|
||||||
<div class="container">
|
|
||||||
<h3 class="title is-4">Breakpoint containers</h3>
|
<h3 class="title is-4">Breakpoint containers</h3>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>
|
<p>
|
||||||
With the two modifiers <code>.is-widescreen</code> and <code>.is-fullhd</code>, you can have a <em>fullwidth</em> container <strong>until</strong> those specific breakpoints.
|
With the two modifiers <code>.is-widescreen</code> and <code>.is-fullhd</code>, you can have a <em>fullwidth</em> container <strong>until</strong> those specific breakpoints.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
{% include layout/main-close.html %}
|
||||||
|
|
||||||
<div class="bd-example is-fullwidth">
|
<div class="bd-example is-fullwidth">
|
||||||
{{container_widescreen_example}}
|
{{container_widescreen_example}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% highlight html %}{{container_widescreen_example}}{% endhighlight %}
|
{% include layout/main-open.html %}
|
||||||
|
|
||||||
|
{% highlight html %}{{ container_widescreen_example }}{% endhighlight %}
|
||||||
|
|
||||||
|
{% include layout/main-close.html %}
|
||||||
|
|
||||||
<div class="bd-example is-fullwidth">
|
<div class="bd-example is-fullwidth">
|
||||||
{{container_fullhd_example}}
|
{{ container_fullhd_example }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% highlight html %}{{container_fullhd_example}}{% endhighlight %}
|
{% include layout/main-open.html %}
|
||||||
|
|
||||||
|
{% highlight html %}{{ container_fullhd_example }}{% endhighlight %}
|
||||||
|
Loading…
Reference in New Issue
Block a user