mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
9b0fcbf9c3
* Prevent print utils from overriding all other display utils Fixes #25221. I agree with the referenced issue—this is unexpected and also causes a serious bug when mixed with other utility classes. This wasn't an issue in v3 given we had different utilities for hiding that weren't focused on display property. * Add printing changes to migration docs * unrelated heading sentence case change * List out all .d-print- classes
39 lines
1.4 KiB
SCSS
39 lines
1.4 KiB
SCSS
// stylelint-disable declaration-no-important
|
|
|
|
//
|
|
// Utilities for common `display` values
|
|
//
|
|
|
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
@include media-breakpoint-up($breakpoint) {
|
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
|
|
.d#{$infix}-none { display: none !important; }
|
|
.d#{$infix}-inline { display: inline !important; }
|
|
.d#{$infix}-inline-block { display: inline-block !important; }
|
|
.d#{$infix}-block { display: block !important; }
|
|
.d#{$infix}-table { display: table !important; }
|
|
.d#{$infix}-table-row { display: table-row !important; }
|
|
.d#{$infix}-table-cell { display: table-cell !important; }
|
|
.d#{$infix}-flex { display: flex !important; }
|
|
.d#{$infix}-inline-flex { display: inline-flex !important; }
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// Utilities for toggling `display` in print
|
|
//
|
|
|
|
@media print {
|
|
.d-print-none { display: none !important; }
|
|
.d-print-inline { display: inline !important; }
|
|
.d-print-inline-block { display: inline-block !important; }
|
|
.d-print-block { display: block !important; }
|
|
.d-print-table { display: table !important; }
|
|
.d-print-table-row { display: table-row !important; }
|
|
.d-print-table-cell { display: table-cell !important; }
|
|
.d-print-flex { display: flex !important; }
|
|
.d-print-inline-flex { display: inline-flex !important; }
|
|
}
|