Add breakpoint based column gaps documentation

This commit is contained in:
Jeremy Thomas 2018-05-30 14:12:03 +02:00
parent 4caa77dc0f
commit 56d58280ca
7 changed files with 575 additions and 6 deletions

View File

@ -5,6 +5,7 @@
### New features
* #1884 New `$navbar-burger-color` variable
* #1679 Add breakpoint based column gaps
### Bug fixes

View File

@ -8638,38 +8638,524 @@ label.panel-block:hover {
--columnGap: 0rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-0-mobile {
--columnGap: 0rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-0-tablet {
--columnGap: 0rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-0-tablet-only {
--columnGap: 0rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-0-touch {
--columnGap: 0rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-0-desktop {
--columnGap: 0rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-0-desktop-only {
--columnGap: 0rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-0-widescreen {
--columnGap: 0rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-0-widescreen-only {
--columnGap: 0rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-0-fullhd {
--columnGap: 0rem;
}
}
.columns.is-variable.is-1 {
--columnGap: 0.25rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-1-mobile {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-1-tablet {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-1-tablet-only {
--columnGap: 0.25rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-1-touch {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-1-desktop {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-1-desktop-only {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-1-widescreen {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-1-widescreen-only {
--columnGap: 0.25rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-1-fullhd {
--columnGap: 0.25rem;
}
}
.columns.is-variable.is-2 {
--columnGap: 0.5rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-2-mobile {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-2-tablet {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-2-tablet-only {
--columnGap: 0.5rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-2-touch {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-2-desktop {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-2-desktop-only {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-2-widescreen {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-2-widescreen-only {
--columnGap: 0.5rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-2-fullhd {
--columnGap: 0.5rem;
}
}
.columns.is-variable.is-3 {
--columnGap: 0.75rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-3-mobile {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-3-tablet {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-3-tablet-only {
--columnGap: 0.75rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-3-touch {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-3-desktop {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-3-desktop-only {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-3-widescreen {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-3-widescreen-only {
--columnGap: 0.75rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-3-fullhd {
--columnGap: 0.75rem;
}
}
.columns.is-variable.is-4 {
--columnGap: 1rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-4-mobile {
--columnGap: 1rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-4-tablet {
--columnGap: 1rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-4-tablet-only {
--columnGap: 1rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-4-touch {
--columnGap: 1rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-4-desktop {
--columnGap: 1rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-4-desktop-only {
--columnGap: 1rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-4-widescreen {
--columnGap: 1rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-4-widescreen-only {
--columnGap: 1rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-4-fullhd {
--columnGap: 1rem;
}
}
.columns.is-variable.is-5 {
--columnGap: 1.25rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-5-mobile {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-5-tablet {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-5-tablet-only {
--columnGap: 1.25rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-5-touch {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-5-desktop {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-5-desktop-only {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-5-widescreen {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-5-widescreen-only {
--columnGap: 1.25rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-5-fullhd {
--columnGap: 1.25rem;
}
}
.columns.is-variable.is-6 {
--columnGap: 1.5rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-6-mobile {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-6-tablet {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-6-tablet-only {
--columnGap: 1.5rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-6-touch {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-6-desktop {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-6-desktop-only {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-6-widescreen {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-6-widescreen-only {
--columnGap: 1.5rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-6-fullhd {
--columnGap: 1.5rem;
}
}
.columns.is-variable.is-7 {
--columnGap: 1.75rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-7-mobile {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-7-tablet {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-7-tablet-only {
--columnGap: 1.75rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-7-touch {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-7-desktop {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-7-desktop-only {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-7-widescreen {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-7-widescreen-only {
--columnGap: 1.75rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-7-fullhd {
--columnGap: 1.75rem;
}
}
.columns.is-variable.is-8 {
--columnGap: 2rem;
}
@media screen and (max-width: 768px) {
.columns.is-variable.is-8-mobile {
--columnGap: 2rem;
}
}
@media screen and (min-width: 769px), print {
.columns.is-variable.is-8-tablet {
--columnGap: 2rem;
}
}
@media screen and (min-width: 769px) and (max-width: 1087px) {
.columns.is-variable.is-8-tablet-only {
--columnGap: 2rem;
}
}
@media screen and (max-width: 1087px) {
.columns.is-variable.is-8-touch {
--columnGap: 2rem;
}
}
@media screen and (min-width: 1088px) {
.columns.is-variable.is-8-desktop {
--columnGap: 2rem;
}
}
@media screen and (min-width: 1088px) and (max-width: 1279px) {
.columns.is-variable.is-8-desktop-only {
--columnGap: 2rem;
}
}
@media screen and (min-width: 1280px) {
.columns.is-variable.is-8-widescreen {
--columnGap: 2rem;
}
}
@media screen and (min-width: 1280px) and (max-width: 1471px) {
.columns.is-variable.is-8-widescreen-only {
--columnGap: 2rem;
}
}
@media screen and (min-width: 1472px) {
.columns.is-variable.is-8-fullhd {
--columnGap: 2rem;
}
}
.tile {
align-items: stretch;
display: block;

File diff suppressed because one or more lines are too long

View File

@ -84,6 +84,29 @@ breadcrumb:
</div>
{% endcapture %}
{% capture columns_variable_responsive_gaps %}
<div class="columns is-variable is-1-mobile is-0-tablet is-3-desktop is-8-widescreen is-2-fullhd">
<div class="column">
Column
</div>
<div class="column">
Column
</div>
<div class="column">
Column
</div>
<div class="column">
Column
</div>
<div class="column">
Column
</div>
<div class="column">
Column
</div>
</div>
{% endcapture %}
{% include elements/anchor.html name="Default gap" %}
<div class="content">
@ -208,3 +231,53 @@ breadcrumb:
</p>
</div>
</div>
{% assign vernum = site.data.meta.version | downcase | remove: "." | plus: 0 %}
{% if vernum >= 72 %}
{% include elements/anchor.html name="Breakpoint based column gaps" %}
{% include elements/new-tag.html version="0.7.2" %}
<div class="content">
<p>
You can define a column gap for each viewport size:
</p>
</div>
For example, here's how it looks with the following modifiers: <code>is-variable is-2-mobile is-0-tablet is-3-desktop is-8-widescreen is-1-fullhd</code>
<div class="highlight-full">
{% highlight html %}{{ columns_variable_responsive_gaps }}{% endhighlight %}
</div>
<div class="columns is-variable is-1-mobile is-0-tablet is-3-desktop is-8-widescreen is-2-fullhd">
<div class="column">
<p class="bd-notification is-primary">Column</p>
</div>
<div class="column">
<p class="bd-notification is-primary">Column</p>
</div>
<div class="column">
<p class="bd-notification is-primary">Column</p>
</div>
<div class="column">
<p class="bd-notification is-primary">Column</p>
</div>
<div class="column">
<p class="bd-notification is-primary">Column</p>
</div>
<div class="column">
<p class="bd-notification is-primary">Column</p>
</div>
</div>
<div class="message is-info">
<p class="message-body">
If you want to see the difference, resize your browser and see how the <strong>columns gap</strong> varies.
</p>
</div>
{% endif %}

View File

@ -588,13 +588,22 @@ breadcrumb:
<p>As for the size modifiers, you can have narrow columns for different <strong>breakpoints</strong>:</p>
<ul>
<li>
<code>is-narrow-mobile</code>
<code>.is-narrow-mobile</code>
</li>
<li>
<code>is-narrow-tablet</code>
<code>.is-narrow-tablet</code>
</li>
<li>
<code>is-narrow-desktop</code>
<code>.is-narrow-touch</code>
</li>
<li>
<code>.is-narrow-desktop</code>
</li>
<li>
<code>.is-narrow-widescreen</code>
</li>
<li>
<code>.is-narrow-fullhd</code>
</li>
</ul>
</div>

View File

@ -52,7 +52,7 @@ breadcrumb:
</tbody>
</table>
{% assign vernum = site.version | downcase | remove: "." | plus: 0 %}
{% assign vernum = site.data.meta.version | downcase | remove: "." | plus: 0 %}
{% if vernum >= 70 %}

View File

@ -206,7 +206,7 @@ $fullhd-enabled: false
</tbody>
</table>
{% assign vernum = site.version | downcase | remove: "." | plus: 0 %}
{% assign vernum = site.data.meta.version | downcase | remove: "." | plus: 0 %}
{% if vernum >= 70 %}