mirror of
https://github.com/jgthms/bulma
synced 2026-03-15 02:04:29 -07:00
Docs/variables data (#1314)
* Replace variables.json with colors.json and update related files accordingly * Add variables data files * Update variables include template and all related files to use new variables data * Fix mobile breakpoint id typo in responsivness docs page * Fix Liquid syntax error in made-with-bulma docs page * Update bulma sass files count in modular docs page * Use breakpoints data in responsiveness helpers docs page * Use breakpoints and variables data in typography helpers docs page * Add missing page titles in docs pages front matter
This commit is contained in:
@@ -4,27 +4,17 @@ layout: documentation
|
||||
doc-tab: form
|
||||
doc-subtab: file
|
||||
file_name: "Screen Shot 2017-07-29 at 15.54.25.png"
|
||||
variables:
|
||||
- name: $file-border-color
|
||||
value: transparent
|
||||
- name: $file-radius
|
||||
value: $radius
|
||||
- name: $file-cta-background-color
|
||||
value: $white-ter
|
||||
- name: $file-cta-color
|
||||
value: $grey-dark
|
||||
- name: $file-cta-hover-color
|
||||
value: $grey-darker
|
||||
- name: $file-cta-active-color
|
||||
value: $grey-darker
|
||||
- name: $file-name-border-color
|
||||
value: $file-cta-background-color
|
||||
- name: $file-name-border-style
|
||||
value: solid
|
||||
- name: $file-name-border-width
|
||||
value: 1px 1px 1px 0
|
||||
- name: $file-name-max-width
|
||||
value: 16em
|
||||
variables_keys:
|
||||
- file-border-color
|
||||
- file-radius
|
||||
- file-cta-background-color
|
||||
- file-cta-color
|
||||
- file-cta-hover-color
|
||||
- file-cta-active-color
|
||||
- file-name-border-color
|
||||
- file-name-border-style
|
||||
- file-name-border-width
|
||||
- file-name-max-width
|
||||
---
|
||||
|
||||
{% capture file %}
|
||||
@@ -749,7 +739,41 @@ variables:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% include variables.html element=true %}
|
||||
{% include anchor.html name="Variables" %}
|
||||
|
||||
<div class="content">
|
||||
<p>
|
||||
You can use <a href="{{ site.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>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -3,21 +3,15 @@ title: Form controls
|
||||
layout: documentation
|
||||
doc-tab: form
|
||||
doc-subtab: general
|
||||
variables:
|
||||
- name: $control-radius
|
||||
value: $radius
|
||||
- name: $control-radius-small
|
||||
value: $radius-small
|
||||
- name: $control-padding-vertical
|
||||
value: calc(0.375em - 1px)
|
||||
- name: $control-padding-horizontal
|
||||
value: calc(0.625em - 1px)
|
||||
- name: $label-color
|
||||
value: $grey-darker
|
||||
- name: $label-weight
|
||||
value: $weight-bold
|
||||
- name: $help-size
|
||||
value: $size-small
|
||||
variables_controls_keys:
|
||||
- control-radius
|
||||
- control-radius-small
|
||||
- control-padding-vertical
|
||||
- control-padding-horizontal
|
||||
variables_form_keys:
|
||||
- label-color
|
||||
- label-weight
|
||||
- help-size
|
||||
---
|
||||
|
||||
{% capture example %}
|
||||
@@ -1027,10 +1021,53 @@ variables:
|
||||
</div>
|
||||
|
||||
{% include snippet.html content=field_label_example horizontal=true more=true %}
|
||||
|
||||
{% include anchor.html name="Variables" %}
|
||||
|
||||
{% capture custom_message %}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>.{% endcapture %}
|
||||
<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>
|
||||
|
||||
{% include variables.html custom_message = custom_message %}
|
||||
<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>
|
||||
</section>
|
||||
|
||||
@@ -3,37 +3,24 @@ title: Input
|
||||
layout: documentation
|
||||
doc-tab: form
|
||||
doc-subtab: input
|
||||
variables:
|
||||
- name: $input-color
|
||||
value: $grey-darker
|
||||
- name: $input-background-color
|
||||
value: $white
|
||||
- name: $input-border-color
|
||||
value: $grey-lighter
|
||||
- name: $input-shadow
|
||||
value: inset 0 1px 2px rgba($black, 0.1)
|
||||
- name: $input-hover-color
|
||||
value: $grey-darker
|
||||
- name: $input-hover-border-color
|
||||
value: $grey-light
|
||||
- name: $input-focus-color
|
||||
value: $grey-darker
|
||||
- name: $input-focus-border-color
|
||||
value: $link
|
||||
- name: $input-disabled-color
|
||||
value: $text-light
|
||||
- name: $input-disabled-background-color
|
||||
value: $background
|
||||
- name: $input-disabled-border-color
|
||||
value: $background
|
||||
- name: $input-arrow
|
||||
value: $link
|
||||
- name: $input-icon-color
|
||||
value: $grey-lighter
|
||||
- name: $input-icon-active-color
|
||||
value: $grey
|
||||
- name: $input-radius
|
||||
value: $radius
|
||||
variables_keys:
|
||||
- input-color
|
||||
- input-background-color
|
||||
- input-border-color
|
||||
- input-shadow
|
||||
- input-hover-color
|
||||
- input-hover-border-color
|
||||
- input-focus-color
|
||||
- input-focus-border-color
|
||||
- input-focus-box-shadow-size
|
||||
- input-focus-box-shadow-color
|
||||
- input-disabled-color
|
||||
- input-disabled-background-color
|
||||
- input-disabled-border-color
|
||||
- input-arrow
|
||||
- input-icon-color
|
||||
- input-icon-active-color
|
||||
- input-radius
|
||||
---
|
||||
|
||||
{% capture input_example %}
|
||||
@@ -484,7 +471,41 @@ variables:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include variables.html element=true %}
|
||||
{% include anchor.html name="Variables" %}
|
||||
|
||||
<div class="content">
|
||||
<p>
|
||||
You can use <a href="{{ site.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>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user