2017-08-14 17:25:14 +00:00
|
|
|
---
|
|
|
|
title: Columns responsiveness
|
2024-03-21 16:11:54 +00:00
|
|
|
layout: docs
|
|
|
|
theme: library
|
|
|
|
doc-library: true
|
2017-08-14 17:25:14 +00:00
|
|
|
doc-tab: columns
|
|
|
|
doc-subtab: responsiveness
|
2018-04-09 11:45:52 +00:00
|
|
|
breadcrumb:
|
2024-03-21 16:11:54 +00:00
|
|
|
- home
|
|
|
|
- documentation
|
|
|
|
- columns
|
|
|
|
- columns-responsiveness
|
2017-08-14 17:25:14 +00:00
|
|
|
---
|
|
|
|
{% capture columns_mobile %}
|
|
|
|
<div class="columns is-mobile">
|
|
|
|
<div class="column">1</div>
|
|
|
|
<div class="column">2</div>
|
|
|
|
<div class="column">3</div>
|
|
|
|
<div class="column">4</div>
|
|
|
|
</div>
|
|
|
|
{% endcapture %}
|
|
|
|
{% capture columns_desktop %}
|
|
|
|
<div class="columns is-desktop">
|
|
|
|
<div class="column">1</div>
|
|
|
|
<div class="column">2</div>
|
|
|
|
<div class="column">3</div>
|
|
|
|
<div class="column">4</div>
|
|
|
|
</div>
|
|
|
|
{% endcapture %}
|
|
|
|
{% capture columns_multiple_breakpoints %}
|
|
|
|
<div class="columns is-mobile">
|
2024-03-21 16:11:54 +00:00
|
|
|
<div
|
|
|
|
class="
|
|
|
|
column
|
|
|
|
is-three-quarters-mobile
|
|
|
|
is-two-thirds-tablet
|
|
|
|
is-half-desktop
|
|
|
|
is-one-third-widescreen
|
|
|
|
is-one-quarter-fullhd
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<code>is-three-quarters-mobile</code><br />
|
|
|
|
<code>is-two-thirds-tablet</code><br />
|
|
|
|
<code>is-half-desktop</code><br />
|
|
|
|
<code>is-one-third-widescreen</code><br />
|
2017-09-09 10:22:38 +00:00
|
|
|
<code>is-one-quarter-fullhd</code>
|
2017-08-14 17:25:14 +00:00
|
|
|
</div>
|
2018-09-27 18:25:10 +00:00
|
|
|
<div class="column">2</div>
|
|
|
|
<div class="column">3</div>
|
|
|
|
<div class="column">4</div>
|
|
|
|
<div class="column">5</div>
|
2017-08-14 17:25:14 +00:00
|
|
|
</div>
|
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/anchor.html name="Mobile columns" %}
|
2018-04-09 11:45:52 +00:00
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
By default, columns are only activated from <strong>tablet</strong> onwards. This means columns are stacked on top
|
|
|
|
of each other on <strong>mobile</strong>.
|
2018-04-09 11:45:52 +00:00
|
|
|
<br>
|
2024-03-21 16:11:54 +00:00
|
|
|
If you want columns to work on <strong>mobile too</strong>, just add the <code>is-mobile</code> modifier on the
|
|
|
|
<code>columns</code> container:
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="columns is-mobile">
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">1</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">2</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">3</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">4</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-03-21 16:11:54 +00:00
|
|
|
{% highlight html -%}
|
|
|
|
{{- columns_mobile -}}
|
|
|
|
{%- endhighlight %}
|
2018-04-09 11:45:52 +00:00
|
|
|
|
|
|
|
<div class="message is-info">
|
2024-03-21 16:11:54 +00:00
|
|
|
<p class="message-header">Resize</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
<p class="message-body">
|
2024-03-21 16:11:54 +00:00
|
|
|
If you want to see the difference, resize your browser and see
|
|
|
|
<em>when</em> the columns are stacked and when they are horizontally distributed.
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
If you <em>only</em> want columns on <strong>desktop</strong> upwards, just use the <code>is-desktop</code> modifier
|
|
|
|
on the <code>columns</code> container:
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="columns is-desktop">
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">1</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">2</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">3</p>
|
2017-08-14 17:25:14 +00:00
|
|
|
</div>
|
2018-04-09 11:45:52 +00:00
|
|
|
<div class="column">
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">4</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-03-21 16:11:54 +00:00
|
|
|
{% highlight html -%}
|
|
|
|
{{- columns_desktop -}}
|
|
|
|
{%- endhighlight %}
|
|
|
|
{% include docs/elements/anchor.html name="Different column sizes per breakpoint" %}
|
2018-04-09 11:45:52 +00:00
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>You can define a <strong>column size</strong> for <em>each</em> viewport size: mobile, tablet, and desktop.</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="columns is-mobile">
|
2024-03-21 16:11:54 +00:00
|
|
|
<div
|
|
|
|
class="
|
|
|
|
column
|
|
|
|
is-three-quarters-mobile
|
|
|
|
is-two-thirds-tablet
|
|
|
|
is-half-desktop
|
|
|
|
is-one-third-widescreen
|
|
|
|
is-one-quarter-fullhd
|
|
|
|
"
|
|
|
|
>
|
2018-04-10 10:45:48 +00:00
|
|
|
<p class="bd-notification is-primary">
|
2018-09-27 18:25:10 +00:00
|
|
|
<code>is-three-quarters-mobile</code><br>
|
|
|
|
<code>is-two-thirds-tablet</code><br>
|
|
|
|
<code>is-half-desktop</code><br>
|
|
|
|
<code>is-one-third-widescreen</code><br>
|
|
|
|
<code>is-one-quarter-fullhd</code><br>
|
2018-04-09 11:45:52 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-09-27 18:25:10 +00:00
|
|
|
<p class="bd-notification is-primary">2</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-09-27 18:25:10 +00:00
|
|
|
<p class="bd-notification is-primary">3</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-09-27 18:25:10 +00:00
|
|
|
<p class="bd-notification is-primary">4</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2018-09-27 18:25:10 +00:00
|
|
|
<p class="bd-notification is-primary">5</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="message is-info">
|
|
|
|
<p class="message-header">Resize</p>
|
2024-03-21 16:11:54 +00:00
|
|
|
<p class="message-body">
|
|
|
|
If you want to see these classes in action, resize your browser window and see how the same column varies in width
|
|
|
|
at each breakpoint.
|
|
|
|
</p>
|
2018-04-09 11:45:52 +00:00
|
|
|
</div>
|
|
|
|
|
2024-03-21 16:11:54 +00:00
|
|
|
<div class="bd-highlight-full">
|
|
|
|
{% highlight html -%}
|
|
|
|
{{- columns_multiple_breakpoints -}}
|
|
|
|
{%- endhighlight %}
|
|
|
|
</div>
|