mirror of
https://github.com/jgthms/bulma
synced 2026-03-21 04:34:30 -07:00
Fix #3720
This commit is contained in:
30
docs/_data/sizes-list.json
Normal file
30
docs/_data/sizes-list.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "size-1",
|
||||||
|
"value": "3rem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size-2",
|
||||||
|
"value": "2.5rem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size-3",
|
||||||
|
"value": "2rem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size-4",
|
||||||
|
"value": "1.5rem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size-5",
|
||||||
|
"value": "1.25rem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size-6",
|
||||||
|
"value": "1rem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size-7",
|
||||||
|
"value": "0.75rem"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -11,41 +11,48 @@ breadcrumb:
|
|||||||
- helpers-typography
|
- helpers-typography
|
||||||
---
|
---
|
||||||
|
|
||||||
{% assign initial_vars =
|
{% assign sizes = site.data['sizes-list'] %}
|
||||||
site.data.variables.utilities['initial-variables'].by_name %} {% assign sizes =
|
|
||||||
site.data.variables.utilities['derived-variables'].by_name['$sizes'].value |
|
{% capture thead %}
|
||||||
split: ' ' %} {% capture thead %}
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Class</th>
|
<th>Class</th>
|
||||||
{% for breakpoint_hash in site.data.breakpoints %} {% assign breakpoint =
|
{% for breakpoint_hash in site.data.breakpoints %}
|
||||||
breakpoint_hash[1] %}
|
{% assign breakpoint = breakpoint_hash[1] %}
|
||||||
<th>
|
<th>
|
||||||
{{ breakpoint.name }}<br />
|
{{ breakpoint.name }}<br />
|
||||||
{% if breakpoint.id == 'mobile' %} Up to
|
{% if breakpoint.id == 'mobile' %} Up to
|
||||||
<code>{{ breakpoint.to }}px</code>
|
<code>{{ breakpoint.to }}px</code>
|
||||||
{% elsif breakpoint.id == 'fullhd' %}
|
{% elsif breakpoint.id == 'fullhd' %}
|
||||||
<code>{{ breakpoint.from }}px</code> and above {% else %} Between
|
<code>{{ breakpoint.from }}px</code> and above {% else %} Between
|
||||||
<code>{{ breakpoint.from }}px</code> and
|
<code>{{ breakpoint.from }}px</code> and
|
||||||
<code>{{ breakpoint.to }}px</code>
|
<code>{{ breakpoint.to }}px</code>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</th>
|
</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% endcapture %} {% capture size1 %}
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% capture size1 %}
|
||||||
<td class="is-narrow has-background-danger-light">
|
<td class="is-narrow has-background-danger-light">
|
||||||
<code class="has-background-danger-light"
|
<code class="has-background-danger-light"
|
||||||
>{{ initial_vars['$size-1'].value }}</code
|
>{{ initial_vars['$size-1'].value }}</code
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
{% endcapture %} {% capture unchanged %}
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% capture unchanged %}
|
||||||
<td class="is-narrow has-text-grey-light">unchanged</td>
|
<td class="is-narrow has-text-grey-light">unchanged</td>
|
||||||
{% endcapture %} {% capture left %}
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% capture left %}
|
||||||
<td class="is-narrow has-background-primary-light has-text-primary">
|
<td class="is-narrow has-background-primary-light has-text-primary">
|
||||||
left-aligned
|
left-aligned
|
||||||
</td>
|
</td>
|
||||||
{% endcapture %} {% include docs/elements/anchor.html name="Size" %}
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% include docs/elements/anchor.html name="Size" %}
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>There are <strong>{{ sizes | size }} sizes</strong> to choose from:</p>
|
<p>There are <strong>{{ sizes | size }} sizes</strong> to choose from:</p>
|
||||||
@@ -62,14 +69,13 @@ split: ' ' %} {% capture thead %}
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for size in sizes %}
|
{% for size in sizes %}
|
||||||
<tr>
|
<tr>
|
||||||
{% assign key = '$size-' | append: forloop.index %}
|
|
||||||
<td>
|
<td>
|
||||||
<code>is-size-{{ forloop.index }}</code>
|
<code>is-{{ size.name }}</code>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<code>{{ initial_vars[key].value }}</code>
|
<code>{{ size.value }}</code>
|
||||||
</td>
|
</td>
|
||||||
<td><span class="is-size-{{ forloop.index }}">Example</span></td>
|
<td><span class="is-{{ size.name }}">Example</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user