diff options
author | Mark Otto <markd.otto@gmail.com> | 2018-01-18 04:29:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-18 04:29:28 +0300 |
commit | 9b0fcbf9c39472cad72cbe82fe5a83e97b07e95f (patch) | |
tree | 5ddb1345f9fe971deed3c6ced1c1015fb8cc4111 /scss/utilities | |
parent | a0936c326ff8b5cf7a31ff172f37c35b6828839b (diff) |
Prevent print utils from overriding all other display utils (#25269)
* 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
Diffstat (limited to 'scss/utilities')
-rw-r--r-- | scss/utilities/_display.scss | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/scss/utilities/_display.scss b/scss/utilities/_display.scss index 893b6387c1..20aeeb5f3e 100644 --- a/scss/utilities/_display.scss +++ b/scss/utilities/_display.scss @@ -25,32 +25,14 @@ // 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; - } +@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; } } |