+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "base/_all.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "base/helpers.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "base/minireset.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "components/_all.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "components/level.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "components/media.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "elements/_all.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "elements/container.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "elements/other.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "grid/_all.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "grid/tiles.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "layout/_all.sass"
-}
\ No newline at end of file
+++ /dev/null
-{
- "by_name": {},
- "list": [],
- "file_path": "layout/hero.sass"
-}
\ No newline at end of file
--- /dev/null
+{
+ "by_name": {
+ "$control-radius": {
+ "name": "$control-radius",
+ "value": "$radius",
+ "type": "variable",
+ "computed_type": "size",
+ "computed_value": "4px"
+ },
+ "$control-radius-small": {
+ "name": "$control-radius-small",
+ "value": "$radius-small",
+ "type": "variable",
+ "computed_type": "size",
+ "computed_value": "2px"
+ },
+ "$control-border-width": {
+ "name": "$control-border-width",
+ "value": "1px",
+ "type": "size"
+ },
+ "$control-padding-vertical": {
+ "name": "$control-padding-vertical",
+ "value": "calc(0.375em - #{$control-border-width})",
+ "type": "size"
+ },
+ "$control-padding-horizontal": {
+ "name": "$control-padding-horizontal",
+ "value": "calc(0.625em - #{$control-border-width})",
+ "type": "size"
+ }
+ },
+ "list": [
+ "$control-radius",
+ "$control-radius-small",
+ "$control-border-width",
+ "$control-padding-vertical",
+ "$control-padding-horizontal"
+ ],
+ "file_path": "utilities/controls.sass"
+}
\ No newline at end of file
{% endcapture %}
-{% include elements/anchor.html name=anchor_name %}
+{% unless include.hide_anchor %}
+ {% include elements/anchor.html name=anchor_name %}
+{% endunless %}
-<div class="content">
- <p>{{ content | strip }}</p>
-</div>
+{% unless include.hide_content %}
+ <div class="content">
+ <p>{{ content | strip }}</p>
+ </div>
+{% endunless %}
<div class="table-container">
<table class="table {{ table_class }}">
<tbody>
{% if include.variables_keys %}
{% for key in include.variables_keys %}
- {% if include.responsiveness_variables %}
- {% assign variable = site.data.variables.utilities.initial-variables.by_name[key] %}
- {% include elements/variable-row.html variable=variable %}
- {% else %}
- {% assign variable = site.data.variables.elements.form.by_name[key] %}
- {% include elements/variable-row.html variable=variable %}
- {% endif %}
+ {% assign variable = site.data.variables[include.folder][include.file].by_name[key] %}
+ {% include elements/variable-row.html variable=variable %}
{% endfor %}
{% else %}
{% for variable_name in variables %}
</p>
</div>
-{% include elements/variables.html type='element' variables_keys=page.variables_keys %}
+{% include elements/variables.html
+ type='element'
+ variables_keys=page.variables_keys
+ folder='elements'
+ file='form'
+%}
- documentation
- form
- form-general
-variables_controls_keys:
-- control-radius
-- control-radius-small
-- control-padding-vertical
-- control-padding-horizontal
-variables_form_keys:
-- label-color
-- label-weight
-- help-size
+variables_control_keys:
+- $control-radius
+- $control-radius-small
+- $control-padding-vertical
+- $control-padding-horizontal
+variables_keys:
+- $label-color
+- $label-weight
+- $help-size
---
{% capture example %}
{% include elements/snippet.html content=field_label_example horizontal=true more=true %}
-{% include elements/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>
+{% 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 %}
-<table class="table is-bordered">
- <thead>
- <tr>
- <th>Name</th>
- <th>Default value</th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <th>Name</th>
- <th>Default value</th>
- </tr>
- </tfoot>
- <tbody>
- {% for key in page.variables_controls_keys %}
- {% assign variable = site.data.variables.utilities.controls.vars[key] %}
- <tr>
- <td>
- <code>{{ variable.name }}</code>
- </td>
- <td>
- <code>{{ variable.value }}</code>
- </td>
- </tr>
- {% endfor %}
- {% for key in page.variables_form_keys %}
- {% assign variable = site.data.variables.elements.form.vars[key] %}
- <tr>
- <td>
- <code>{{ variable.name }}</code>
- </td>
- <td>
- <code>{{ variable.value }}</code>
- </td>
- </tr>
- {% endfor %}
- </tbody>
-</table>
+{% include elements/variables.html
+ type='element'
+ variables_keys=page.variables_control_keys
+ custom_message=custom_message
+ folder='utilities'
+ file='controls'
+%}
+
+{% include elements/variables.html
+ type='element'
+ variables_keys=page.variables_keys
+ folder='elements'
+ file='form'
+ hide_anchor=true
+ hide_content=true
+%}
</div>
</div>
-{% include elements/variables.html type='element' variables_keys=page.variables_keys %}
+{% include elements/variables.html type='element'
+ variables_keys=page.variables_keys
+ folder='elements'
+ file='form'
+%}
type='element'
variables_keys=page.variables_keys
custom_message=custom_message
- responsiveness_variables=true
+ folder='utilities'
+ file='initial-variables'
%}
setImmediate(done);
Object.keys(files).forEach(file_path => {
- if (file_path.startsWith('utilities')) {
- return;
- }
+ // if (file_path.startsWith('utilities')) {
+ // return;
+ // }
const {file_name, lines} = utils.getLines(files, file_path);
let variables = {
}
});
- utils.writeFile(file_path, variables);
+ if (variables.list.length > 0) {
+ utils.writeFile(file_path, variables);
+ }
});
};
}