Skip to content

Commit

Permalink
Configurable display utility classes
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens committed Dec 23, 2018
1 parent e4fe18e commit 2cc0bdb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
1 change: 1 addition & 0 deletions scss/_variables.scss
Expand Up @@ -1089,6 +1089,7 @@ $pre-scrollable-max-height: 340px !default;

// Utilities

$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default;
$overflows: auto, hidden !default;
$positions: static, relative, absolute, fixed, sticky !default;

Expand Down
24 changes: 6 additions & 18 deletions scss/utilities/_display.scss
Expand Up @@ -8,15 +8,9 @@
@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; }
@each $value in $displays {
.d#{$infix}-#{$value} { display: $value !important; }
}
}
}

Expand All @@ -26,13 +20,7 @@
//

@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; }
@each $value in $displays {
.d-print-#{$value} { display: $value !important; }
}
}

0 comments on commit 2cc0bdb

Please sign in to comment.