Add breakpoint containers

This commit is contained in:
Jeremy Thomas 2017-07-21 11:22:08 +02:00
parent 39a09d204a
commit 06a392072b
14 changed files with 234 additions and 139 deletions

View File

@ -2,6 +2,11 @@
## 0.4.4 ## 0.4.4
### New features
* The breakpoints and `.container` **gap** can be customized with the new `$gap` variable
* The `.container` has 2 new modifiers: `.is-widescreen` and `.is-fullhd`
### Issues closed ### Issues closed
* Fix #26 `.textarea` element will honors `[rows]` attribute * Fix #26 `.textarea` element will honors `[rows]` attribute

View File

@ -1 +1 @@
<span class="tag">>= 1000px</span> <span class="tag">>= 1008px</span>

View File

@ -0,0 +1 @@
<span class="tag">>= 1392px</span>

View File

@ -1 +1 @@
<span class="tag">< 1000px</span> <span class="tag">< 1008px</span>

View File

@ -0,0 +1 @@
<span class="tag">>= 1200px</span>

View File

@ -1,5 +1,5 @@
<nav class="navbar has-shadow"> <nav class="navbar has-shadow">
<div class="container"> <div class="container is-fullhd">
<div class="navbar-brand"> <div class="navbar-brand">
{% if site.vernum >= 43 %} {% if site.vernum >= 43 %}
<a class="navbar-item is-tab {% if page.doc-subtab == 'breadcrumb' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/breadcrumb/"> <a class="navbar-item is-tab {% if page.doc-subtab == 'breadcrumb' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/breadcrumb/">
@ -9,6 +9,11 @@
<a class="navbar-item is-tab {% if page.doc-subtab == 'card' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/card/"> <a class="navbar-item is-tab {% if page.doc-subtab == 'card' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/card/">
Card Card
</a> </a>
{% if site.vernum >= 44 %}
<a class="navbar-item is-tab {% if page.doc-subtab == 'dropdown' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/dropdown/">
Dropdown
</a>
{% endif %}
<a class="navbar-item is-tab {% if page.doc-subtab == 'level' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/level/"> <a class="navbar-item is-tab {% if page.doc-subtab == 'level' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/level/">
Level Level
</a> </a>

View File

@ -235,31 +235,31 @@ table th {
} }
} }
@media screen and (min-width: 769px) and (max-width: 999px) { @media screen and (min-width: 769px) and (max-width: 1007px) {
.is-block-tablet-only { .is-block-tablet-only {
display: block !important; display: block !important;
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-block-touch { .is-block-touch {
display: block !important; display: block !important;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-block-desktop { .is-block-desktop {
display: block !important; display: block !important;
} }
} }
@media screen and (min-width: 1000px) and (max-width: 1191px) { @media screen and (min-width: 1008px) and (max-width: 1199px) {
.is-block-desktop-only { .is-block-desktop-only {
display: block !important; display: block !important;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-block-widescreen { .is-block-widescreen {
display: block !important; display: block !important;
} }
@ -281,31 +281,31 @@ table th {
} }
} }
@media screen and (min-width: 769px) and (max-width: 999px) { @media screen and (min-width: 769px) and (max-width: 1007px) {
.is-flex-tablet-only { .is-flex-tablet-only {
display: flex !important; display: flex !important;
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-flex-touch { .is-flex-touch {
display: flex !important; display: flex !important;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-flex-desktop { .is-flex-desktop {
display: flex !important; display: flex !important;
} }
} }
@media screen and (min-width: 1000px) and (max-width: 1191px) { @media screen and (min-width: 1008px) and (max-width: 1199px) {
.is-flex-desktop-only { .is-flex-desktop-only {
display: flex !important; display: flex !important;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-flex-widescreen { .is-flex-widescreen {
display: flex !important; display: flex !important;
} }
@ -327,31 +327,31 @@ table th {
} }
} }
@media screen and (min-width: 769px) and (max-width: 999px) { @media screen and (min-width: 769px) and (max-width: 1007px) {
.is-inline-tablet-only { .is-inline-tablet-only {
display: inline !important; display: inline !important;
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-inline-touch { .is-inline-touch {
display: inline !important; display: inline !important;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-inline-desktop { .is-inline-desktop {
display: inline !important; display: inline !important;
} }
} }
@media screen and (min-width: 1000px) and (max-width: 1191px) { @media screen and (min-width: 1008px) and (max-width: 1199px) {
.is-inline-desktop-only { .is-inline-desktop-only {
display: inline !important; display: inline !important;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-inline-widescreen { .is-inline-widescreen {
display: inline !important; display: inline !important;
} }
@ -373,31 +373,31 @@ table th {
} }
} }
@media screen and (min-width: 769px) and (max-width: 999px) { @media screen and (min-width: 769px) and (max-width: 1007px) {
.is-inline-block-tablet-only { .is-inline-block-tablet-only {
display: inline-block !important; display: inline-block !important;
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-inline-block-touch { .is-inline-block-touch {
display: inline-block !important; display: inline-block !important;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-inline-block-desktop { .is-inline-block-desktop {
display: inline-block !important; display: inline-block !important;
} }
} }
@media screen and (min-width: 1000px) and (max-width: 1191px) { @media screen and (min-width: 1008px) and (max-width: 1199px) {
.is-inline-block-desktop-only { .is-inline-block-desktop-only {
display: inline-block !important; display: inline-block !important;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-inline-block-widescreen { .is-inline-block-widescreen {
display: inline-block !important; display: inline-block !important;
} }
@ -419,31 +419,31 @@ table th {
} }
} }
@media screen and (min-width: 769px) and (max-width: 999px) { @media screen and (min-width: 769px) and (max-width: 1007px) {
.is-inline-flex-tablet-only { .is-inline-flex-tablet-only {
display: inline-flex !important; display: inline-flex !important;
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-inline-flex-touch { .is-inline-flex-touch {
display: inline-flex !important; display: inline-flex !important;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-inline-flex-desktop { .is-inline-flex-desktop {
display: inline-flex !important; display: inline-flex !important;
} }
} }
@media screen and (min-width: 1000px) and (max-width: 1191px) { @media screen and (min-width: 1008px) and (max-width: 1199px) {
.is-inline-flex-desktop-only { .is-inline-flex-desktop-only {
display: inline-flex !important; display: inline-flex !important;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-inline-flex-widescreen { .is-inline-flex-widescreen {
display: inline-flex !important; display: inline-flex !important;
} }
@ -491,25 +491,25 @@ table th {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-size-1-touch { .is-size-1-touch {
font-size: 3rem; font-size: 3rem;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-size-1-desktop { .is-size-1-desktop {
font-size: 3rem; font-size: 3rem;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-size-1-widescreen { .is-size-1-widescreen {
font-size: 3rem; font-size: 3rem;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.is-size-1-fullhd { .is-size-1-fullhd {
font-size: 3rem; font-size: 3rem;
} }
@ -531,25 +531,25 @@ table th {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-size-2-touch { .is-size-2-touch {
font-size: 2.5rem; font-size: 2.5rem;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-size-2-desktop { .is-size-2-desktop {
font-size: 2.5rem; font-size: 2.5rem;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-size-2-widescreen { .is-size-2-widescreen {
font-size: 2.5rem; font-size: 2.5rem;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.is-size-2-fullhd { .is-size-2-fullhd {
font-size: 2.5rem; font-size: 2.5rem;
} }
@ -571,25 +571,25 @@ table th {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-size-3-touch { .is-size-3-touch {
font-size: 2rem; font-size: 2rem;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-size-3-desktop { .is-size-3-desktop {
font-size: 2rem; font-size: 2rem;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-size-3-widescreen { .is-size-3-widescreen {
font-size: 2rem; font-size: 2rem;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.is-size-3-fullhd { .is-size-3-fullhd {
font-size: 2rem; font-size: 2rem;
} }
@ -611,25 +611,25 @@ table th {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-size-4-touch { .is-size-4-touch {
font-size: 1.5rem; font-size: 1.5rem;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-size-4-desktop { .is-size-4-desktop {
font-size: 1.5rem; font-size: 1.5rem;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-size-4-widescreen { .is-size-4-widescreen {
font-size: 1.5rem; font-size: 1.5rem;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.is-size-4-fullhd { .is-size-4-fullhd {
font-size: 1.5rem; font-size: 1.5rem;
} }
@ -651,25 +651,25 @@ table th {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-size-5-touch { .is-size-5-touch {
font-size: 1.25rem; font-size: 1.25rem;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-size-5-desktop { .is-size-5-desktop {
font-size: 1.25rem; font-size: 1.25rem;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-size-5-widescreen { .is-size-5-widescreen {
font-size: 1.25rem; font-size: 1.25rem;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.is-size-5-fullhd { .is-size-5-fullhd {
font-size: 1.25rem; font-size: 1.25rem;
} }
@ -691,25 +691,25 @@ table th {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-size-6-touch { .is-size-6-touch {
font-size: 1rem; font-size: 1rem;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-size-6-desktop { .is-size-6-desktop {
font-size: 1rem; font-size: 1rem;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-size-6-widescreen { .is-size-6-widescreen {
font-size: 1rem; font-size: 1rem;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.is-size-6-fullhd { .is-size-6-fullhd {
font-size: 1rem; font-size: 1rem;
} }
@ -815,31 +815,31 @@ a.has-text-danger:hover, a.has-text-danger:focus {
} }
} }
@media screen and (min-width: 769px) and (max-width: 999px) { @media screen and (min-width: 769px) and (max-width: 1007px) {
.is-hidden-tablet-only { .is-hidden-tablet-only {
display: none !important; display: none !important;
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.is-hidden-touch { .is-hidden-touch {
display: none !important; display: none !important;
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.is-hidden-desktop { .is-hidden-desktop {
display: none !important; display: none !important;
} }
} }
@media screen and (min-width: 1000px) and (max-width: 1191px) { @media screen and (min-width: 1008px) and (max-width: 1199px) {
.is-hidden-desktop-only { .is-hidden-desktop-only {
display: none !important; display: none !important;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.is-hidden-widescreen { .is-hidden-widescreen {
display: none !important; display: none !important;
} }
@ -3428,30 +3428,41 @@ input[type="submit"].button {
} }
.container { .container {
position: relative;
}
@media screen and (min-width: 1000px) {
.container {
margin: 0 auto; margin: 0 auto;
max-width: 960px; max-width: 960px;
position: relative;
width: 960px; width: 960px;
} }
.container.is-fluid {
margin: 0 20px; .container.is-fluid {
margin-left: 24px;
margin-right: 24px;
max-width: none; max-width: none;
width: auto; width: auto;
}
@media screen and (max-width: 1199px) {
.container.is-widescreen {
max-width: 1152px;
width: auto;
} }
} }
@media screen and (min-width: 1192px) { @media screen and (max-width: 1391px) {
.container.is-fullhd {
max-width: 1344px;
width: auto;
}
}
@media screen and (min-width: 1200px) {
.container { .container {
max-width: 1152px; max-width: 1152px;
width: 1152px; width: 1152px;
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.container { .container {
max-width: 1344px; max-width: 1344px;
width: 1344px; width: 1344px;
@ -4553,7 +4564,7 @@ a.nav-item:not(.button).is-tab.is-active {
padding-bottom: calc(0.75rem - 3px); padding-bottom: calc(0.75rem - 3px);
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.nav-item a:not(.button).is-brand, .nav-item a:not(.button).is-brand,
a.nav-item:not(.button).is-brand { a.nav-item:not(.button).is-brand {
padding-left: 0; padding-left: 0;
@ -4571,7 +4582,7 @@ a.nav-item:not(.button).is-tab.is-active {
overflow: auto; overflow: auto;
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.nav-left, .nav-left,
.nav-right { .nav-right {
flex-basis: 0; flex-basis: 0;
@ -4800,7 +4811,7 @@ a.navbar-item:hover, a.navbar-item.is-active,
margin: 0.5rem 0; margin: 0.5rem 0;
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.navbar-brand .navbar-item { .navbar-brand .navbar-item {
align-items: center; align-items: center;
display: flex; display: flex;
@ -4814,7 +4825,7 @@ a.navbar-item:hover, a.navbar-item.is-active,
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.navbar, .navbar,
.navbar-menu, .navbar-menu,
.navbar-start, .navbar-start,
@ -5839,7 +5850,7 @@ label.panel-block:hover {
} }
} }
@media screen and (max-width: 999px) { @media screen and (max-width: 1007px) {
.column.is-narrow-touch { .column.is-narrow-touch {
flex: none; flex: none;
} }
@ -5968,7 +5979,7 @@ label.panel-block:hover {
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.column.is-narrow-desktop { .column.is-narrow-desktop {
flex: none; flex: none;
} }
@ -6097,7 +6108,7 @@ label.panel-block:hover {
} }
} }
@media screen and (min-width: 1192px) { @media screen and (min-width: 1200px) {
.column.is-narrow-widescreen { .column.is-narrow-widescreen {
flex: none; flex: none;
} }
@ -6226,7 +6237,7 @@ label.panel-block:hover {
} }
} }
@media screen and (min-width: 1384px) { @media screen and (min-width: 1392px) {
.column.is-narrow-fullhd { .column.is-narrow-fullhd {
flex: none; flex: none;
} }
@ -6424,7 +6435,7 @@ label.panel-block:hover {
} }
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.columns.is-desktop { .columns.is-desktop {
display: flex; display: flex;
} }
@ -7501,11 +7512,10 @@ label.panel-block:hover {
.section { .section {
background-color: white; background-color: white;
min-height: 100vh;
padding: 3rem 1.5rem; padding: 3rem 1.5rem;
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
.section.is-medium { .section.is-medium {
padding: 9rem 1.5rem; padding: 9rem 1.5rem;
} }
@ -8057,7 +8067,7 @@ html.route-index #carbon {
color: white; color: white;
} }
@media screen and (min-width: 1000px) { @media screen and (min-width: 1008px) {
#blogDropdown { #blogDropdown {
width: 16rem; width: 16rem;
} }

View File

@ -66,10 +66,26 @@ doc-subtab: dropdown
</div> </div>
{% endcapture %} {% endcapture %}
{% include subnav-components.html %}
<section class="section"> <section class="section">
<div class="container"> <div class="container">
<div class="columns" style="margin-bottom: -0.75rem !important;">
<div class="column">
<h1 class="title">Dropdown</h1> <h1 class="title">Dropdown</h1>
<h2 class="subtitle">An interactive <strong>dropdown menu</strong> for discoverable content</h2> <h2 class="subtitle">
An interactive <strong>dropdown menu</strong> for discoverable content
</h2>
</div>
<div class="column is-narrow">
<p class="content">
<span class="tag is-success">New!</span>
<span class="tag is-info">0.4.4</span>
</p>
</div>
</div>
<hr> <hr>

View File

@ -289,7 +289,7 @@ doc-subtab: select
</div> </div>
</div> </div>
{% if site.vernum >= 42 %} {% if site.vernum >= 44 %}
<hr> <hr>
<h3 class="title">Multiple select</h3> <h3 class="title">Multiple select</h3>

View File

@ -4,6 +4,38 @@ doc-tab: layout
doc-subtab: container doc-subtab: container
--- ---
{% capture container_example %}
<div class="container">
<div class="notification">
This container is <strong>centered</strong> on desktop.
</div>
</div>
{% endcapture %}
{% capture container_fluid_example %}
<div class="container is-fluid">
<div class="notification">
This container is <strong>fluid</strong>: it will have a 24px gap on either side, on any viewport size.
</div>
</div>
{% endcapture %}
{% capture container_widescreen_example %}
<div class="container is-widescreen">
<div class="notification">
This container is <strong>fullwidth</strong> <em>until</em> the <code>$widescreen</code> breakpoint.
</div>
</div>
{% endcapture %}
{% capture container_fullhd_example %}
<div class="container is-fullhd">
<div class="notification">
This container is <strong>fullwidth</strong> <em>until</em> the <code>$fullhd</code> breakpoint.
</div>
</div>
{% endcapture %}
{% include subnav-layout.html %} {% include subnav-layout.html %}
<section class="section"> <section class="section">
@ -25,52 +57,61 @@ doc-subtab: container
</ul> </ul>
<p>This is how the container will behave:</p> <p>This is how the container will behave:</p>
<ul> <ul>
<li>on <strong>mobile</strong> and <strong>tablet</strong>, it will have a margin of <strong>20px</strong> on both the left and right sides.</li> <li>on <strong>mobile</strong> and <strong>tablet</strong> {% include bp/touch.html %}, it will have a margin of <strong>24px</strong> on each side.</li>
<li>on <strong>desktop</strong> (>= 1000px), it will have a maximum width of <strong>960px</strong> and will be <strong>horizontally centered</strong>.</li> <li>on <strong>desktop</strong> {% include bp/desktop.html %}, it will have a maximum width of <strong>960px</strong> and will be <strong>horizontally centered</strong>.</li>
<li>on <strong>widescreen</strong> (>= 1192px), it will have a maximum width of <strong>1152px</strong>.</li> <li>on <strong>widescreen</strong> {% include bp/widescreen.html %}, it will have a maximum width of <strong>1152px</strong>.</li>
<li>on <strong>fullhd</strong> (>= 1384px), it will have a maximum width of <strong>1344px</strong>.</li> <li>on <strong>fullhd</strong> {% include bp/fullhd.html %}, it will have a maximum width of <strong>1344px</strong>.</li>
</ul> </ul>
<p>
The <code>$gap</code> variable has a default value of <code>24px</code> but can be modified.
</p>
<p>The values <strong>960</strong>, <strong>1152</strong> and <strong>1344</strong> have been chosen because they are divisible by both <strong>12</strong> and <strong>16</strong>.</p> <p>The values <strong>960</strong>, <strong>1152</strong> and <strong>1344</strong> have been chosen because they are divisible by both <strong>12</strong> and <strong>16</strong>.</p>
</div> </div>
</div> </div>
</section> </section>
<div class="example is-fullwidth"> <div class="example is-fullwidth">
<div class="container"> {{container_example}}
<div class="notification">
This container is <strong>centered</strong> on desktop.
</div>
</div>
</div>
{% highlight html %}
<div class="container">
<div class="notification">
This container is <strong>centered</strong> on desktop.
</div>
</div> </div>
{% endhighlight %}
<div class="container"> {% highlight html %}{{container_example}}{% endhighlight %}
<div class="container">
<hr> <hr>
<h3 class="title">Fluid container</h3> <h3 class="title">Fluid container</h3>
<div class="content"> <div class="content">
<p>If you don't want to have a maximum width but want to keep the 20px margin on the left and right sides, add the <code>is-fluid</code> modifier:</p> <p>If you don't want to have a maximum width but want to keep the 24px margin on the left and right sides, add the <code>is-fluid</code> modifier:</p>
</div>
</div>
<div class="example is-fullwidth">
<div class="container is-fluid">
<div class="notification">
This container is <strong>fluid</strong>: it will have a 20px gap on either side.
</div>
</div>
</div>
{% highlight html %}
<div class="container is-fluid">
<div class="notification">
This container is <strong>fluid</strong>: it will have a 20px gap on either side, on any viewport size.
</div> </div>
</div> </div>
{% endhighlight %}
<div class="example is-fullwidth">
{{container_fluid_example}}
</div>
{% highlight html %}{{container_fluid_example}}{% endhighlight %}
<div class="container">
<hr>
<h3 class="title">Breakpoint containers</h3>
<div class="content">
<p>
<span class="tag is-success">New!</span>
<span class="tag is-info">0.4.4</span>
</p>
<p>
With the two modifiers <code>.is-widescreen</code> and <code>.is-fullhd</code>, you can have a <em>fullwidth</em> container <strong>until</strong> those specific breakpoints.
</p>
</div>
</div>
<div class="example is-fullwidth">
{{container_widescreen_example}}
</div>
{% highlight html %}{{container_widescreen_example}}{% endhighlight %}
<div class="example is-fullwidth">
{{container_fullhd_example}}
</div>
{% highlight html %}{{container_fullhd_example}}{% endhighlight %}

View File

@ -254,18 +254,26 @@ doc-subtab: variables
<td><code>16px</code></td> <td><code>16px</code></td>
</tr> </tr>
<tr><th colspan="2">Breakpoints</th></tr> <tr><th colspan="5">Breakpoints</th></tr>
<tr>
<td><code>$gap</code></td>
<td>24px</td>
</tr>
<tr> <tr>
<td><code>$tablet</code></td> <td><code>$tablet</code></td>
<td>769px</td> <td>769px</td>
</tr> </tr>
<tr> <tr>
<td><code>$desktop</code></td> <td><code>$desktop</code></td>
<td>1000px (960px + 40px container)</td> <td>1008px (960px + 2 * <code>$gap</code>)</td>
</tr> </tr>
<tr> <tr>
<td><code>$widescreen</code></td> <td><code>$widescreen</code></td>
<td>1192px (1152px+ 40px container)</td> <td>1200px (1152px+ 2 * <code>$gap</code>)</td>
</tr>
<tr>
<td><code>$fullhd</code></td>
<td>1392px (1344px+ 2 * <code>$gap</code>)</td>
</tr> </tr>
<tr><th colspan="2">Miscellaneous</th></tr> <tr><th colspan="2">Miscellaneous</th></tr>

View File

@ -2,22 +2,29 @@
+block +block
.container .container
position: relative
+desktop
margin: 0 auto margin: 0 auto
max-width: $desktop - 40px max-width: $desktop - (2 * $gap)
width: $desktop - 40px position: relative
// Modifiers width: $desktop - (2 * $gap)
&.is-fluid &.is-fluid
margin: 0 20px margin-left: $gap
margin-right: $gap
max-width: none max-width: none
width: auto width: auto
+until($widescreen)
&.is-widescreen
max-width: $widescreen - (2 * $gap)
width: auto
+until($fullhd)
&.is-fullhd
max-width: $fullhd - (2 * $gap)
width: auto
+widescreen +widescreen
max-width: $widescreen - 40px max-width: $widescreen - (2 * $gap)
width: $widescreen - 40px width: $widescreen - (2 * $gap)
+fullhd +fullhd
max-width: $fullhd - 40px max-width: $fullhd - (2 * $gap)
width: $fullhd - 40px width: $fullhd - (2 * $gap)
.delete .delete
+delete +delete

View File

@ -1,6 +1,5 @@
.section .section
background-color: $white background-color: $white
min-height: 100vh
padding: 3rem 1.5rem padding: 3rem 1.5rem
// Responsiveness // Responsiveness
+desktop +desktop

View File

@ -48,14 +48,16 @@ $body-size: 16px !default
// Responsiveness // Responsiveness
// The container gap, which acts as the offset for breakpoints
$gap: 24px !default
// 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16 // 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16
$tablet: 769px !default $tablet: 769px !default
// 960px container + 40px // 960px container + 3rem
$desktop: 1000px !default $desktop: 960px + (2 * $gap) !default
// 1152px container + 40 // 1152px container + 3rem
$widescreen: 1192px !default $widescreen: 1152px + (2 * $gap) !default
// 1344px container + 40 // 1344px container + 3rem
$fullhd: 1384px !default $fullhd: 1344px + (2 * $gap) !default
// Miscellaneous // Miscellaneous