- The .file
element is a simple interactive label that wraps an <input type="file">
. It comprises several sub-elements:
+ The file
element is a simple interactive label that wraps an <input type="file">
. It comprises several sub-elements:
-
-
.file
the main container +file
the main container-
-
.file-label
the actual interactive and clickable part of the element +file-label
the actual interactive and clickable part of the element-
-
.file-input
the native file input, hidden for styling purposes +file-input
the native file input, hidden for styling purposes -
-
.file-cta
the upload call-to-action +file-cta
the upload call-to-action-
-
.file-icon
an optional upload icon +file-icon
an optional upload icon -
-
.file-label
the "Choose a file…" text +file-label
the "Choose a file…" text
-
-
-
-
.file-name
a container for the chosen file name +file-name
a container for the chosen file name
@@ -609,7 +609,7 @@ meta:
-
-
-
-
.is-small
+is-small
-
-
.is-medium
+is-medium
-
-
.is-large
+is-large
.label
- .input
- .textarea
- .select
- .checkbox
- .radio
- .button
- .help
+ label
+ input
+ textarea
+ select
+ checkbox
+ radio
+ button
+ help
- + resize form controls + +
- + combine form controls into a group + +
- + combine form controls into a list + +
- + append and prepend icons to a form control + +
-
-
.is-small
+is-small
-
-
.is-normal
for any.input
or.button
+is-normal
for anyinput
orbutton
-
-
.is-medium
+is-medium
-
-
.is-large
+is-large
type="text"
type="password"
type="email"
type="tel"
-
+
:hover
andis-hovered
+
+ -
+
:focus
andis-focused
+
+ -
+
:active
andis-active
+
+ -
+
:hover
andis-hovered
+
+ -
+
:focus
andis-focused
+
+ -
+
:active
andis-active
+
+
- With the
.has-name
modifier combined with the.file-name
element, you can add a placeholder for the selected file name. + With thehas-name
modifier combined with thefile-name
element, you can add a placeholder for the selected file name.@@ -625,7 +625,7 @@ meta:- You can move the CTA to the right side with the
.is-right
modifier. + You can move the CTA to the right side with theis-right
modifier.@@ -641,7 +641,7 @@ meta:- You can also expand the name to fill up the space with the
.is-fullwidth
modifier. + You can also expand the name to fill up the space with theis-fullwidth
modifier.@@ -657,7 +657,7 @@ meta:- You can have a boxed block with the
.is-boxed
modifier. + You can have a boxed block with theis-boxed
modifier.@@ -673,7 +673,7 @@ meta:- You can combine
.has-name
and.is-boxed
. + You can combinehas-name
andis-boxed
.@@ -710,13 +710,13 @@ meta:diff --git a/docs/documentation/form/general.html b/docs/documentation/form/general.html index 77630862..be0b8791 100644 --- a/docs/documentation/form/general.html +++ b/docs/documentation/form/general.html @@ -106,6 +106,12 @@ variables_keys:+ ++{% endcapture %} + {% capture field_example %}@@ -807,23 +813,66 @@ variables_keys: {% endcapture %}{% endcapture %} +-+The following form controls classes are supported:
++ Bulma supports the following native HTML form elements:
+<form>
<button>
<input>
<textarea>
and<label>
. ++ The following CSS classes are supported: +
-
-
Each of them should be wrapped in a
.control
container.
- When combining several controls in a form, use the.field
class as a container, to keep the spacing consistent.++ +{% include elements/anchor.html name="Complete form example" %} + {% include elements/snippet.html content=example more=true %} +{% include elements/anchor.html name="Form control" %} + ++ To maintain the design evenly balanced, Bulma provides a very useful
+control
container with which you can wrap the form controls. +
+ When combining several controls in a form, use thefield
class as a container, to keep the spacing consistent. +++ +{% include elements/snippet.html content=control_example %} + ++ The
+control
element is a wrapper for form controls. It gives the possibility to: +-
+
++ {% include elements/anchor.html name="Form field" %}+ For the best results using Bulma, it's recommended to use the
+control
element as often as possible. +@@ -1015,20 +1064,20 @@ variables_keys:- To preserve the vertical alignment of labels with each type and size of control, the
.field-label
comes with 4 size modifiers: + To preserve the vertical alignment of labels with each type and size of control, thefield-label
comes with 4 size modifiers:-The following modifiers are supported:
- -The following type attributes are supported:
++ The Bulma
input
CSS class is meant for<input">
HTML elements. The following type attributes are supported: ++ Several modifiers are supported which affect: +
+diff --git a/docs/documentation/form/select.html b/docs/documentation/form/select.html index dea0d061..f90fc8ea 100644 --- a/docs/documentation/form/select.html +++ b/docs/documentation/form/select.html @@ -280,7 +280,22 @@ meta: {% endcapture %}@@ -319,10 +323,10 @@ meta:-+ +The following modifiers are supported:
++ The
+select
class is a simple wrapper around the<select">
HTML element, which gives the styling more flexibility and support for icons. +++ + -+ {{ select_example }} +++ {% highlight html %}{{ select_example }}{% endhighlight %} ++-- -- {{select_example}} --- {% highlight html %}{{select_example}}{% endhighlight %} --
- -Multiple select
+{% include elements/anchor.html name="Multiple select" %}@@ -308,10 +312,10 @@ meta: You can style a multiple select dropdown, by using the- {{select_multiple_example}} + {{ select_multiple_example }}is-multiple
modifier, and by using themultiple
HTML attribute.- {% highlight html %}{{select_multiple_example}}{% endhighlight %} + {% highlight html %}{{ select_multiple_example }}{% endhighlight %}- {{colors_example}} + {{ colors_example }}- {% highlight html %}{{colors_example}}{% endhighlight %} + {% highlight html %}{{ colors_example }}{% endhighlight %}+++ You can create a rounded dropdown by appending the
+is-rounded
modifier: +{{ rounded_example }} @@ -341,62 +351,86 @@ meta: {% include elements/anchor.html name="Sizes" %} +- {{has_icons_small_example}} + {{ has_icons_small_example }}+++ The
+select
element comes in 4 different sizes: +- {{sizes_example}} + {{ sizes_example }}- {% highlight html %}{{sizes_example}}{% endhighlight %} + {% highlight html %}{{ sizes_example }}{% endhighlight %}
+{% include elements/anchor.html name="States" %} + ++-+ Bulma styles the different states of the
+select
elment. Each state is available as a pseudo-class and a CSS class: +-
+
+ This allows you to obtain the style of a certain state without having to trigger it. +
+States
Normal
+- {{normal_example}} + {{ normal_example }}- {% highlight html %}{{normal_example}}{% endhighlight %} + {% highlight html %}{{ normal_example }}{% endhighlight %}Hover
- {{hover_example}} + {{ hover_example }}- {% highlight html %}{{hover_example}}{% endhighlight %} + {% highlight html %}{{ hover_example }}{% endhighlight %}Focus
- {{focus_example}} + {{ focus_example }}- {% highlight html %}{{focus_example}}{% endhighlight %} + {% highlight html %}{{ focus_example }}{% endhighlight %}Loading
- {{loading_example}} + {{ loading_example }}- {% highlight html %}{{loading_example}}{% endhighlight %} + {% highlight html %}{{ loading_example }}{% endhighlight %}
+{% include elements/anchor.html name="With icons" %} -With icons
You can append the modifier on a control:
-
@@ -414,10 +448,10 @@ meta:
- {{icons_example}} + {{ icons_example }}- {% highlight html %}{{icons_example}}{% endhighlight %} + {% highlight html %}{{ icons_example }}{% endhighlight %}- {% highlight html %}{{has_icons_small_example}}{% endhighlight %} + {% highlight html %}{{ has_icons_small_example }}{% endhighlight %}- {{has_icons_normal_example}} + {{ has_icons_normal_example }}- {% highlight html %}{{has_icons_normal_example}}{% endhighlight %} + {% highlight html %}{{ has_icons_normal_example }}{% endhighlight %}- {{has_icons_medium_example}} + {{ has_icons_medium_example }}- {% highlight html %}{{has_icons_medium_example}}{% endhighlight %} + {% highlight html %}{{ has_icons_medium_example }}{% endhighlight %}- {{has_icons_large_example}} + {{ has_icons_large_example }}- {% highlight html %}{{has_icons_large_example}}{% endhighlight %} + {% highlight html %}{{ has_icons_large_example }}{% endhighlight %}++ {% include elements/snippet.html content=textarea_example %} {% capture fixedsize_example %} @@ -142,7 +148,7 @@ meta:+ The Bulma
+textarea
CSS class is the multiline version of theinput
element: +- You can set the height of the textarea using the `rows` HTML attribute. + You can set the height of the textarea using the
rows
HTML attribute.++ {% include elements/snippet.html content=colors_example %} {% include elements/anchor.html name="Sizes" %} ++ The
+textarea
element is available in several colors: +++ {% include elements/snippet.html content=sizes_example %} {% include elements/anchor.html name="States" %} ++ The
+textarea
element comes in 4 different sizes: ++++ Bulma styles the different states of the
+textarea
elment. Each state is available as a pseudo-class and a CSS class: +-
+
+ This allows you to obtain the style of a certain state without having to trigger it. +
+Normal
{% include elements/snippet.html content=normal_example %} @@ -209,4 +247,10 @@ meta:Fixed Size
+++ {% include elements/snippet.html content=fixedsize_example %}+ You can disable a
+textarea
resizing by appending thehas-fixed-size
modifier: + -
-