Commit 7e07d5bf authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev

parents 07f63324 95f37e4c
Showing with 230 additions and 190 deletions
+230 -190
...@@ -243,17 +243,19 @@ Our documentation received an upgrade across the board as well. Here's the low d ...@@ -243,17 +243,19 @@ Our documentation received an upgrade across the board as well. Here's the low d
All `@screen-` variables have been removed in v4.0.0. Use the `media-breakpoint-up()`, `media-breakpoint-down()`, or `media-breakpoint-only()` Sass mixins or the `$grid-breakpoints` Sass map instead. All `@screen-` variables have been removed in v4.0.0. Use the `media-breakpoint-up()`, `media-breakpoint-down()`, or `media-breakpoint-only()` Sass mixins or the `$grid-breakpoints` Sass map instead.
The responsive utility classes have also been overhauled. Our responsive utility classes have largely been removed in favor of explicit `display` utilities.
- The `.hidden` and `.show` classes have been removed because they conflicted with jQuery's `$(...).hide()` and `$(...).show()` methods. Instead, try toggling the `[hidden]` attribute, use inline styles like `style="display: none;"` and `style="display: block;"`, or toggle the `.invisible` class. - The `.hidden` and `.show` classes have been removed because they conflicted with jQuery's `$(...).hide()` and `$(...).show()` methods. Instead, try toggling the `[hidden]` attribute or use inline styles like `style="display: none;"` and `style="display: block;"`.
- The old classes (`.hidden-xs` `.hidden-sm` `.hidden-md` `.hidden-lg` `.visible-xs-block` `.visible-xs-inline` `.visible-xs-inline-block` `.visible-sm-block` `.visible-sm-inline` `.visible-sm-inline-block` `.visible-md-block` `.visible-md-inline` `.visible-md-inline-block` `.visible-lg-block` `.visible-lg-inline` `.visible-lg-inline-block`) are gone. - All `.hidden-` classes have been removed, save for the print utilities which have been renamed.
- They have been replaced by `.hidden-xs-up` `.hidden-xs-down` `.hidden-sm-up` `.hidden-sm-down` `.hidden-md-up` `.hidden-md-down` `.hidden-lg-up` `.hidden-lg-down`. - Removed from v3: `.hidden-xs` `.hidden-sm` `.hidden-md` `.hidden-lg` `.visible-xs-block` `.visible-xs-inline` `.visible-xs-inline-block` `.visible-sm-block` `.visible-sm-inline` `.visible-sm-inline-block` `.visible-md-block` `.visible-md-inline` `.visible-md-inline-block` `.visible-lg-block` `.visible-lg-inline` `.visible-lg-inline-block`
- The `.hidden-*-up` classes hide the element when the viewport is at the given breakpoint or larger (e.g. `.hidden-md-up` hides an element on medium, large, and extra-large devices). - Removed from v4 alphas: `.hidden-xs-up` `.hidden-xs-down` `.hidden-sm-up` `.hidden-sm-down` `.hidden-md-up` `.hidden-md-down` `.hidden-lg-up` `.hidden-lg-down`
- The `.hidden-*-down` classes hide the element when the viewport is at the given breakpoint or smaller (e.g. `.hidden-md-down` hides an element on extra-small, small, and medium devices). - Print utilities no longer start with `.hidden-` or `.visible-`, but with `.d-print-`.
- Old names: `.visible-print-block`, `.visible-print-inline`, `.visible-print-inline-block`, `.hidden-print`
- New classes: `.d-print-block`, `.d-print-inline`, `.d-print-inline-block`, `.d-print-none`
Rather than using explicit `.visible-*` classes, you make an element visible by simply not hiding it at that screen size. You can combine one `.hidden-*-up` class with one `.hidden-*-down` class to show an element only on a given interval of screen sizes (e.g. `.hidden-sm-down.hidden-xl-up` shows the element only on medium and large devices). Rather than using explicit `.visible-*` classes, you make an element visible by simply not hiding it at that screen size. You can combine one `.d-*-none` class with one `.d-*-block` class to show an element only on a given interval of screen sizes (e.g. `.d-none.d-md-block.d-lg-none` shows the element only on medium and large devices).
Note that the changes to the grid breakpoints in v4 means that you'll need to go one breakpoint larger to achieve the same results (e.g. `.hidden-md` is more similar to `.hidden-lg-down` than to `.hidden-md-down`). The new responsive utility classes don't attempt to accommodate less common cases where an element's visibility can't be expressed as a single contiguous range of viewport sizes; you will instead need to use custom CSS in such cases. Note that the changes to the grid breakpoints in v4 means that you'll need to go one breakpoint larger to achieve the same results. The new responsive utility classes don't attempt to accommodate less common cases where an element's visibility can't be expressed as a single contiguous range of viewport sizes; you will instead need to use custom CSS in such cases.
## Misc notes to prioritize ## Misc notes to prioritize
......
---
layout: docs
title: Display property
group: utilities
---
Use `.d-block`, `.d-inline`, or `.d-inline-block` to simply set an element's [`display` property](https://developer.mozilla.org/en-US/docs/Web/CSS/display) to `block`, `inline`, or `inline-block` (respectively).
To make an element `display: none`, use our [responsive utilities]({{ site.baseurl }}/layout/responsive-utilities/) instead.
{% example html %}
<div class="d-inline bg-success">Inline</div>
<div class="d-inline bg-success">Inline</div>
{% endexample %}
{% example html %}
<span class="d-block bg-primary">Block</span>
{% endexample %}
{% example html %}
<div class="d-inline-block bg-warning">
<h3>inline-block</h3>
Boot that strap!
</div>
<div class="d-inline-block bg-warning">
<h3>inline-block</h3>
Strap that boot!
</div>
{% endexample %}
---
layout: docs
title: Display property
group: utilities
---
Quickly and responsively toggle the `display` value of components and more with our display utilities. Includes support for some of the more common values, as well as some extras for controlling `display` when printing.
## Contents
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}
## Common `display` values
The [`display` property](https://developer.mozilla.org/en-US/docs/Web/CSS/display) accepts a handful of values and we support many of them with utility classes. We purposefully don't provide every value as a utility, so here's what we support:
- `.d-none`
- `.d-inline`
- `.d-inline-block`
- `.d-block`
- `.d-table`
- `.d-table-cell`
- `.d-flex`
- `.d-inline-flex`
Put them to use by applying any of the classes to an element of your choice. For example, here's how you could use the inline, block, or inline-block utilities (the same applies to the other classes).
{% example html %}
<div class="d-inline bg-success">d-inline</div>
<div class="d-inline bg-success">d-inline</div>
{% endexample %}
{% example html %}
<span class="d-block bg-primary">d-block</span>
{% endexample %}
{% example html %}
<div class="d-inline-block bg-warning">d-inline-block</div>
<div class="d-inline-block bg-warning">d-inline-block</div>
{% endexample %}
Responsive variations also exist for every single utility mentioned above.
{% for bp in site.data.breakpoints %}
- `.d{{ bp.abbr }}-none`
- `.d{{ bp.abbr }}-inline`
- `.d{{ bp.abbr }}-inline-block`
- `.d{{ bp.abbr }}-block`
- `.d{{ bp.abbr }}-table`
- `.d{{ bp.abbr }}-table-cell`
- `.d{{ bp.abbr }}-flex`
- `.d{{ bp.abbr }}-inline-flex`{% endfor %}
## Display in print
Change the `display` value of elements when printing with our print display utilities.
| Class | Print style |
| --- | --- |
| `.d-print-block` | Applies `display: block` to the element when printing |
| `.d-print-inline` | Applies `display: inline` to the element when printing |
| `.d-print-inline-block` | Applies `display: inline-block` to the element when printing |
| `.d-print-none` | Applies `display: none` to the element when printing |
...@@ -14,7 +14,7 @@ Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` e ...@@ -14,7 +14,7 @@ Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` e
{% example html %} {% example html %}
<div class="embed-responsive embed-responsive-16by9"> <div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe> <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
</div> </div>
{% endexample %} {% endexample %}
......
...@@ -35,11 +35,11 @@ Where *sides* is one of: ...@@ -35,11 +35,11 @@ Where *sides* is one of:
Where *size* is one of: Where *size* is one of:
* `0` - for classes that eliminate the `margin` or `padding` by setting it to `0` * `0` - for classes that eliminate the `margin` or `padding` by setting it to `0`
* `1` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * .25` or `$spacer-y * .25` * `1` - (by default) for classes that set the `margin` or `padding` to `$spacer * .25`
* `2` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * .5` or `$spacer-y * .5` * `2` - (by default) for classes that set the `margin` or `padding` to `$spacer * .5`
* `3` - (by default) for classes that set the `margin` or `padding` to `$spacer-x` or `$spacer-y` * `3` - (by default) for classes that set the `margin` or `padding` to `$spacer`
* `4` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 1.5` or `$spacer-y * 1.5` * `4` - (by default) for classes that set the `margin` or `padding` to `$spacer * 1.5`
* `5` - (by default) for classes that set the `margin` or `padding` to `$spacer-x * 3` or `$spacer-y * 3` * `5` - (by default) for classes that set the `margin` or `padding` to `$spacer * 3`
(You can add more sizes by adding entries to the `$spacers` Sass map variable.) (You can add more sizes by adding entries to the `$spacers` Sass map variable.)
...@@ -53,16 +53,16 @@ Here are some representative examples of these classes: ...@@ -53,16 +53,16 @@ Here are some representative examples of these classes:
} }
.ml-1 { .ml-1 {
margin-left: ($spacer-x * .25) !important; margin-left: ($spacer * .25) !important;
} }
.px-2 { .px-2 {
padding-left: ($spacer-x * .5) !important; padding-left: ($spacer * .5) !important;
padding-right: ($spacer-x * .5) !important; padding-right: ($spacer * .5) !important;
} }
.p-3 { .p-3 {
padding: $spacer-y $spacer-x !important; padding: $spacer !important;
} }
{% endhighlight %} {% endhighlight %}
......
--- ---
layout: docs layout: docs
title: Invisible content title: Visibility
group: utilities group: utilities
--- ---
The `.invisible` class can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document. Set the `visibility` of elements with our visibility utilities. These do not modify the `display` value at all and are helpful for hiding content from most users, but still keeping them for screen readers.
Apply `.visible` or `.invisible` as needed.
{% highlight html %} {% highlight html %}
<div class="visible">...</div>
<div class="invisible">...</div> <div class="invisible">...</div>
{% endhighlight %} {% endhighlight %}
{% highlight scss %} {% highlight scss %}
// Class // Class
.visible {
visibility: visible;
}
.invisible { .invisible {
visibility: hidden; visibility: hidden;
} }
// Usage as a mixin // Usage as a mixin
.element { .element {
@include invisible; @include invisible(visible);
}
.element {
@include invisible(hidden);
} }
{% endhighlight %} {% endhighlight %}
.breadcrumb { .breadcrumb {
padding: $breadcrumb-padding-y $breadcrumb-padding-x; padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $spacer-y; margin-bottom: 1rem;
list-style: none; list-style: none;
background-color: $breadcrumb-bg; background-color: $breadcrumb-bg;
@include border-radius($border-radius); @include border-radius($border-radius);
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
.custom-select { .custom-select {
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;
$select-border-width: ($border-width * 2); $select-border-width: ($custom-select-border-width * 2);
height: calc(#{$input-height} + #{$select-border-width}); height: calc(#{$input-height} + #{$select-border-width});
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
line-height: $custom-select-line-height; line-height: $custom-select-line-height;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
} }
.figure-img { .figure-img {
margin-bottom: ($spacer-y / 2); margin-bottom: ($spacer / 2);
line-height: 1; line-height: 1;
} }
......
...@@ -2,22 +2,6 @@ ...@@ -2,22 +2,6 @@
// //
// Used in conjunction with global variables to enable certain theme features. // Used in conjunction with global variables to enable certain theme features.
@mixin box-shadow($shadow...) {
@if $enable-shadows {
box-shadow: $shadow;
}
}
@mixin transition($transition...) {
@if $enable-transitions {
@if length($transition) == 0 {
transition: $transition-base;
} @else {
transition: $transition;
}
}
}
// Utilities // Utilities
@import "mixins/breakpoints"; @import "mixins/breakpoints";
@import "mixins/hover"; @import "mixins/hover";
...@@ -47,7 +31,9 @@ ...@@ -47,7 +31,9 @@
// // Skins // // Skins
@import "mixins/background-variant"; @import "mixins/background-variant";
@import "mixins/border-radius"; @import "mixins/border-radius";
@import "mixins/box-shadow";
@import "mixins/gradients"; @import "mixins/gradients";
@import "mixins/transition";
// // Layout // // Layout
@import "mixins/clearfix"; @import "mixins/clearfix";
......
...@@ -55,9 +55,9 @@ ...@@ -55,9 +55,9 @@
.nav-link.active, .nav-link.active,
.nav-item.show .nav-link { .nav-item.show .nav-link {
color: $nav-tabs-active-link-hover-color; color: $nav-tabs-active-link-color;
background-color: $nav-tabs-active-link-hover-bg; background-color: $nav-tabs-active-link-bg;
border-color: $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-border-color $nav-tabs-active-link-hover-bg; border-color: $nav-tabs-active-link-border-color $nav-tabs-active-link-border-color $nav-tabs-active-link-bg;
} }
.dropdown-menu { .dropdown-menu {
......
...@@ -51,8 +51,8 @@ h6, .h6 { font-size: $font-size-h6; } ...@@ -51,8 +51,8 @@ h6, .h6 { font-size: $font-size-h6; }
// //
hr { hr {
margin-top: $spacer-y; margin-top: 1rem;
margin-bottom: $spacer-y; margin-bottom: 1rem;
border: 0; border: 0;
border-top: $hr-border-width solid $hr-border-color; border-top: $hr-border-width solid $hr-border-color;
} }
......
...@@ -138,36 +138,15 @@ $enable-print-styles: true !default; ...@@ -138,36 +138,15 @@ $enable-print-styles: true !default;
// variables. Mostly focused on spacing. // variables. Mostly focused on spacing.
// You can add more entries to the $spacers map, should you need more variation. // You can add more entries to the $spacers map, should you need more variation.
$spacer: 1rem !default; $spacer: 1rem !default;
$spacer-x: $spacer !default;
$spacer-y: $spacer !default;
$spacers: ( $spacers: (
0: ( 0: 0,
x: 0, 1: ($spacer * .25),
y: 0 2: ($spacer * .5),
), 3: $spacer,
1: ( 4: ($spacer * 1.5),
x: ($spacer-x * .25), 5: ($spacer * 3)
y: ($spacer-y * .25)
),
2: (
x: ($spacer-x * .5),
y: ($spacer-y * .5)
),
3: (
x: $spacer-x,
y: $spacer-y
),
4: (
x: ($spacer-x * 1.5),
y: ($spacer-y * 1.5)
),
5: (
x: ($spacer-x * 3),
y: ($spacer-y * 3)
)
) !default; ) !default;
$border-width: 1px !default;
// This variable affects the `.h-*` and `.w-*` classes. // This variable affects the `.h-*` and `.w-*` classes.
$sizes: ( $sizes: (
...@@ -237,6 +216,30 @@ $grid-gutter-widths: ( ...@@ -237,6 +216,30 @@ $grid-gutter-widths: (
xl: $grid-gutter-width-base xl: $grid-gutter-width-base
) !default; ) !default;
// Components
//
// Define common padding and border radius sizes and more.
$line-height-lg: (4 / 3) !default;
$line-height-sm: 1.5 !default;
$border-width: 1px !default;
$border-radius: .25rem !default;
$border-radius-lg: .3rem !default;
$border-radius-sm: .2rem !default;
$component-active-color: $white !default;
$component-active-bg: $brand-primary !default;
$caret-width: .3em !default;
$transition-base: all .2s ease-in-out !default;
$transition-fade: opacity .15s linear !default;
$transition-collapse: height .35s ease !default;
// Fonts // Fonts
// //
// Font, line-height, and color for body text, headings, and more. // Font, line-height, and color for body text, headings, and more.
...@@ -305,27 +308,6 @@ $nested-kbd-font-weight: $font-weight-bold !default; ...@@ -305,27 +308,6 @@ $nested-kbd-font-weight: $font-weight-bold !default;
$list-inline-padding: 5px !default; $list-inline-padding: 5px !default;
// Components
//
// Define common padding and border radius sizes and more.
$line-height-lg: (4 / 3) !default;
$line-height-sm: 1.5 !default;
$border-radius: .25rem !default;
$border-radius-lg: .3rem !default;
$border-radius-sm: .2rem !default;
$component-active-color: $white !default;
$component-active-bg: $brand-primary !default;
$caret-width: .3em !default;
$transition-base: all .2s ease-in-out !default;
$transition-fade: opacity .15s linear !default;
$transition-collapse: height .35s ease !default;
// Tables // Tables
// //
// Customizes the `.table` component with basic values, each used across all table variations. // Customizes the `.table` component with basic values, each used across all table variations.
...@@ -450,7 +432,7 @@ $form-check-input-margin-x: .25rem !default; ...@@ -450,7 +432,7 @@ $form-check-input-margin-x: .25rem !default;
$form-check-inline-margin-x: .75rem !default; $form-check-inline-margin-x: .75rem !default;
$form-group-margin-bottom: $spacer-y !default; $form-group-margin-bottom: 1rem !default;
$input-group-addon-bg: $gray-lighter !default; $input-group-addon-bg: $gray-lighter !default;
$input-group-addon-border-color: $input-border-color !default; $input-group-addon-border-color: $input-border-color !default;
...@@ -581,8 +563,8 @@ $dropdown-header-color: $gray-light !default; ...@@ -581,8 +563,8 @@ $dropdown-header-color: $gray-light !default;
$zindex-dropdown-backdrop: 990 !default; $zindex-dropdown-backdrop: 990 !default;
$zindex-dropdown: 1000 !default; $zindex-dropdown: 1000 !default;
$zindex-sticky: 1020 !default;
$zindex-fixed: 1030 !default; $zindex-fixed: 1030 !default;
$zindex-sticky: 1030 !default;
$zindex-modal-backdrop: 1040 !default; $zindex-modal-backdrop: 1040 !default;
$zindex-modal: 1050 !default; $zindex-modal: 1050 !default;
$zindex-popover: 1060 !default; $zindex-popover: 1060 !default;
...@@ -621,9 +603,9 @@ $nav-tabs-border-color: #ddd !default; ...@@ -621,9 +603,9 @@ $nav-tabs-border-color: #ddd !default;
$nav-tabs-border-width: $border-width !default; $nav-tabs-border-width: $border-width !default;
$nav-tabs-border-radius: $border-radius !default; $nav-tabs-border-radius: $border-radius !default;
$nav-tabs-link-hover-border-color: $gray-lighter !default; $nav-tabs-link-hover-border-color: $gray-lighter !default;
$nav-tabs-active-link-hover-color: $gray !default; $nav-tabs-active-link-color: $gray !default;
$nav-tabs-active-link-hover-bg: $body-bg !default; $nav-tabs-active-link-bg: $body-bg !default;
$nav-tabs-active-link-hover-border-color: #ddd !default; $nav-tabs-active-link-border-color: #ddd !default;
$nav-pills-border-radius: $border-radius !default; $nav-pills-border-radius: $border-radius !default;
$nav-pills-active-link-color: $component-active-color !default; $nav-pills-active-link-color: $component-active-color !default;
...@@ -804,7 +786,7 @@ $modal-transition: transform .3s ease-out !default; ...@@ -804,7 +786,7 @@ $modal-transition: transform .3s ease-out !default;
$alert-padding-x: 1.25rem !default; $alert-padding-x: 1.25rem !default;
$alert-padding-y: .75rem !default; $alert-padding-y: .75rem !default;
$alert-margin-bottom: $spacer-y !default; $alert-margin-bottom: 1rem !default;
$alert-border-radius: $border-radius !default; $alert-border-radius: $border-radius !default;
$alert-link-font-weight: $font-weight-bold !default; $alert-link-font-weight: $font-weight-bold !default;
$alert-border-width: $border-width !default; $alert-border-width: $border-width !default;
......
@mixin box-shadow($shadow...) {
@if $enable-shadows {
box-shadow: $shadow;
}
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@mixin nav-divider($color: #e5e5e5) { @mixin nav-divider($color: #e5e5e5) {
height: 1px; height: 1px;
margin: ($spacer-y / 2) 0; margin: ($spacer / 2) 0;
overflow: hidden; overflow: hidden;
background-color: $color; background-color: $color;
} }
@mixin transition($transition...) {
@if $enable-transitions {
@if length($transition) == 0 {
transition: $transition-base;
} @else {
transition: $transition;
}
}
}
// Visibility // Visibility
@mixin invisible { @mixin invisible($visibility) {
visibility: hidden !important; visibility: $visibility !important;
} }
// //
// Display utilities // Utilities for common `display` values
// //
@each $breakpoint in map-keys($grid-breakpoints) { @each $breakpoint in map-keys($grid-breakpoints) {
...@@ -16,3 +16,38 @@ ...@@ -16,3 +16,38 @@
.d#{$infix}-inline-flex { display: inline-flex !important; } .d#{$infix}-inline-flex { display: inline-flex !important; }
} }
} }
//
// Utilities for toggling `display` in print
//
.d-print-block {
display: none !important;
@media print {
display: block !important;
}
}
.d-print-inline {
display: none !important;
@media print {
display: inline !important;
}
}
.d-print-inline-block {
display: none !important;
@media print {
display: inline-block !important;
}
}
.d-print-none {
@media print {
display: none !important;
}
}
...@@ -5,22 +5,20 @@ ...@@ -5,22 +5,20 @@
$infix: breakpoint-infix($breakpoint, $grid-breakpoints); $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@each $prop, $abbrev in (margin: m, padding: p) { @each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $lengths in $spacers { @each $size, $length in $spacers {
$length-x: map-get($lengths, x);
$length-y: map-get($lengths, y);
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length-y $length-x !important; } .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
.#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length-y !important; } .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length !important; }
.#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length-x !important; } .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length !important; }
.#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length-y !important; } .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length !important; }
.#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length-x !important; } .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length !important; }
.#{$abbrev}x#{$infix}-#{$size} { .#{$abbrev}x#{$infix}-#{$size} {
#{$prop}-right: $length-x !important; #{$prop}-right: $length !important;
#{$prop}-left: $length-x !important; #{$prop}-left: $length !important;
} }
.#{$abbrev}y#{$infix}-#{$size} { .#{$abbrev}y#{$infix}-#{$size} {
#{$prop}-top: $length-y !important; #{$prop}-top: $length !important;
#{$prop}-bottom: $length-y !important; #{$prop}-bottom: $length !important;
} }
} }
} }
......
...@@ -2,54 +2,10 @@ ...@@ -2,54 +2,10 @@
// Visibility utilities // Visibility utilities
// //
.invisible { .visible {
@include invisible(); @include invisible(visible);
}
// Responsive visibility utilities
@each $bp in map-keys($grid-breakpoints) {
.hidden-#{$bp}-up {
@include media-breakpoint-up($bp) {
display: none !important;
}
}
.hidden-#{$bp}-down {
@include media-breakpoint-down($bp) {
display: none !important;
}
}
} }
.invisible {
// Print utilities @include invisible(hidden);
//
// Media queries are placed on the inside to be mixin-friendly.
.visible-print-block {
display: none !important;
@media print {
display: block !important;
}
}
.visible-print-inline {
display: none !important;
@media print {
display: inline !important;
}
}
.visible-print-inline-block {
display: none !important;
@media print {
display: inline-block !important;
}
}
.hidden-print {
@media print {
display: none !important;
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment