diff --git a/docs/_data/breakpoints.json b/docs/_data/breakpoints.json new file mode 100644 index 00000000..14443275 --- /dev/null +++ b/docs/_data/breakpoints.json @@ -0,0 +1,31 @@ +{ + "mobile": { + "id": "mobile", + "name": "Mobile", + "from": 0, + "to": 768 + }, + "tablet": { + "id": "tablet", + "name": "Tablet", + "from": 769, + "to": 1023 + }, + "desktop": { + "id": "desktop", + "name": "Desktop", + "from": 1024, + "to": 1215 + }, + "widescreen": { + "id": "widescreen", + "name": "Widescreen", + "from": 1216, + "to": 1407 + }, + "fullhd": { + "id": "fullhd", + "name": "FullHD", + "from": 1408 + } +} diff --git a/docs/_includes/bp/desktop.html b/docs/_includes/bp/desktop.html index 14f3bcb3..586dcd37 100644 --- a/docs/_includes/bp/desktop.html +++ b/docs/_includes/bp/desktop.html @@ -1 +1 @@ ->= 1008px +>= {{ site.data.breakpoints.desktop.from }}px diff --git a/docs/_includes/bp/fullhd.html b/docs/_includes/bp/fullhd.html index d2e45546..f0875c90 100644 --- a/docs/_includes/bp/fullhd.html +++ b/docs/_includes/bp/fullhd.html @@ -1 +1 @@ ->= 1392px +>= {{ site.data.breakpoints.fullhd.from }}px diff --git a/docs/_includes/bp/touch.html b/docs/_includes/bp/touch.html index 0f25e0dc..818102dc 100644 --- a/docs/_includes/bp/touch.html +++ b/docs/_includes/bp/touch.html @@ -1 +1 @@ -< 1008px +< {{ site.data.breakpoints.desktop.from }}px diff --git a/docs/_includes/bp/widescreen.html b/docs/_includes/bp/widescreen.html index faeef67f..e1b8b8dc 100644 --- a/docs/_includes/bp/widescreen.html +++ b/docs/_includes/bp/widescreen.html @@ -1 +1 @@ ->= 1200px +>= {{ site.data.breakpoints.widescreen.from }}px diff --git a/docs/documentation/overview/responsiveness.html b/docs/documentation/overview/responsiveness.html index d73e7080..9ee22572 100644 --- a/docs/documentation/overview/responsiveness.html +++ b/docs/documentation/overview/responsiveness.html @@ -3,6 +3,17 @@ title: Responsiveness layout: documentation doc-tab: overview doc-subtab: responsiveness +variables: +- name: $gap + value: 32px +- name: $tablet + value: 769px +- name: $desktop + value: 960px + (2 * $gap) +- name: $widescreen + value: 1152px + (2 * $gap) +- name: $fullhd + value: 1344px + (2 * $gap) --- {% include subnav-overview.html %} @@ -27,81 +38,71 @@ doc-subtab: responsiveness {% include anchor.html name="Breakpoints" %} + + {% assign variables_file_url = "/blob/master/sass/utilities/initial-variables.sass#L46,L57" | prepend: site.github %} + {% assign mixins_file_url = "/blob/master/sass/utilities/mixins.sass#L182,L226" | prepend: site.github %}
-

Bulma has 5 breakpoints:

+

Bulma has 5 breakpoints:

-

Bulma uses 9 responsive mixins:

+ +

Bulma uses 9 responsive mixins:

- - - - - + {% for breakpoint_hash in site.data.breakpoints %} + {% assign breakpoint = breakpoint_hash[1] %} + + {% endfor %} @@ -188,5 +189,10 @@ doc-subtab: responsiveness
- Mobile
- Up to 768px -
- Tablet
- Between 769px and 1007px -
- Desktop
- Between 1008px and 1199px -
- Widescreen
- Between 1200px and 1391px -
- FullHD
- 1392px and above -
+ {{ breakpoint.name }}
+ {% if breakpoint.id == 'mobile' %} + Up to {{ breakpoint.to }}px + {% elsif breakpoint.id == 'fullhd' %} + {{ breakpoint.from }}px and above + {% else %} + Between {{ breakpoint.from }}px and {{ breakpoint.to }}px + {% endif %} +
+ + {% capture custom_message %}You can use these variables to customize the responsive breakpoints. Simply set one or multiple of these variables before importing Bulma. Learn how.{% endcapture %} + + {% include variables.html custom_message = custom_message %} +