2016-09-11 11:00:49 +00:00
---
2017-07-29 12:02:00 +00:00
title: Responsiveness
2016-09-11 11:00:49 +00:00
layout: documentation
doc-tab: overview
doc-subtab: responsiveness
2018-04-09 16:32:12 +00:00
breadcrumb:
- home
- documentation
- overview
- overview-responsiveness
2017-10-17 09:28:59 +00:00
variables_keys:
2018-06-16 20:12:34 +00:00
- $gap
- $tablet
- $desktop
- $widescreen
- $fullhd
2016-09-11 11:00:49 +00:00
---
2018-04-08 19:11:48 +00:00
{% capture scss_code %}
// Disable the widescreen breakpoint
$widescreen-enabled: false
// Disable the fullhd breakpoint
$fullhd-enabled: false
{% endcapture %}
2018-04-09 21:25:26 +00:00
{% include elements/anchor.html name="Vertical by default" %}
2016-09-11 11:00:49 +00:00
2018-04-09 16:32:12 +00:00
< div class = "content" >
< p >
Every element in Bulma is < strong > mobile-first< / strong > and optimizes for < strong > vertical reading< / strong > , so by default on mobile:
< / p >
< ul >
< li > < code > columns< / code > are stacked vertically< / li >
< li > the < code > level< / code > component will show its children stacked vertically< / li >
< li > the < code > nav< / code > menu will be hidden< / li >
< / ul >
2019-01-01 15:56:22 +00:00
< p > You can however enforce the < strong > horizontal< / strong > layout for both < code > columns< / code > or < code > level< / code > by appending the < code > is-mobile< / code > modifier.< / p >
2018-04-09 16:32:12 +00:00
< / div >
2016-09-11 11:00:49 +00:00
2018-04-09 21:25:26 +00:00
{% include elements/anchor.html name="Breakpoints" %}
2016-09-11 11:00:49 +00:00
2019-10-15 15:29:58 +00:00
{% assign variables_file_url = "/blob/master/sass/utilities/initial-variables.sass#L56,L64" | prepend: site.data.meta.github %}
2018-04-17 13:52:59 +00:00
{% assign mixins_file_url = "/blob/master/sass/utilities/mixins.sass#L81,L129" | prepend: site.data.meta.github %}
2017-03-14 21:19:06 +00:00
2018-04-09 16:32:12 +00:00
< div class = "content" >
2021-09-19 22:36:15 +00:00
< p > Bulma has < a href = "{{ variables_file_url }}" target = "_blank" > 4 breakpoints< / a > which defines < strong > 5 screen sizes< / strong > :< / p >
2018-04-09 16:32:12 +00:00
< ul >
{% for breakpoint_hash in site.data.breakpoints %}
{% assign breakpoint = breakpoint_hash[1] %}
< li > < code > {{ breakpoint.id }}< / code > : {% if breakpoint.id == 'mobile' %}up to < code > {{ breakpoint.to }}px< / code > {% else %}from < code > {{ breakpoint.from }}px< / code > {% endif %}< / li >
{% endfor %}
< / ul >
2017-12-06 23:48:35 +00:00
2021-09-19 22:36:15 +00:00
< p > To make use of these breakpoints, Bulma provides < a href = "{{ site.url }}/documentation/utilities/responsive-mixins/" > 9 responsive mixins< / a > .< / p >
2018-04-09 16:32:12 +00:00
< / div >
2017-03-14 21:19:06 +00:00
2021-09-19 22:36:15 +00:00
{% include components/breakpoints-table.html %}
{% assign urm_link = site.data.links.by_id['utilities-responsive-mixins'] %}
< div class = "content" >
< p >
To simplify using these breakpoints, Bulma provides < a href = "{{ site.url }}{{ urm_link.path }}" > easy-to-use responsive mixins< / a > .
< / p >
2018-09-04 13:26:02 +00:00
< / div >
2016-09-11 11:00:49 +00:00
2018-05-30 12:12:03 +00:00
{% assign vernum = site.data.meta.version | downcase | remove: "." | plus: 0 %}
2018-04-10 09:55:39 +00:00
2018-04-13 15:15:13 +00:00
{% if vernum >= 70 %}
2017-12-06 23:48:35 +00:00
2018-04-09 21:25:26 +00:00
{% include elements/anchor.html name="Disabling breakpoints" %}
2016-09-11 11:00:49 +00:00
2018-04-09 16:32:12 +00:00
< div class = "content" >
< p >
2018-07-21 23:25:37 +00:00
By default, the < code > $widescreen< / code > and < code > $fullhd< / code > breakpoints are < strong > enabled< / strong > . You can disable them by setting the corresponding Sass boolean to < code > false< / code > :
2018-04-09 16:32:12 +00:00
< / p >
< / div >
2018-04-08 19:11:48 +00:00
2021-01-27 23:30:42 +00:00
< div class = "bd-highlight-full" >
2018-04-09 16:32:12 +00:00
{% highlight sass %}{{ scss_code }}{% endhighlight %}
< / div >
2018-04-08 19:11:48 +00:00
2018-04-13 15:15:13 +00:00
{% endif %}
2017-10-17 09:28:59 +00:00
2018-06-16 20:12:34 +00:00
{% capture custom_message %}
These are < a href = "{{ derived_variables.file_url }}" target = "_blank" > variables< / a > with a value that < strong > references< / strong > another variable.
{% endcapture %}
2018-04-08 19:11:48 +00:00
2021-01-27 23:30:42 +00:00
{% include components/variables.html
2018-06-16 20:12:34 +00:00
type='element'
variables_keys=page.variables_keys
custom_message=custom_message
2018-06-19 12:33:54 +00:00
folder='utilities'
file='initial-variables'
2018-06-16 20:12:34 +00:00
%}