Merge pull request #4958 from Icinga/fix/browser-print-dialog-result-4957

Fix browser print dialog result
This commit is contained in:
Johannes Meyer 2022-12-07 13:05:06 +01:00 committed by GitHub
commit 0096f43e0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 2 deletions

View File

@ -23,7 +23,7 @@ use ReflectionProperty;
class Visitor extends Less_VisitorReplacing
{
const LIGHT_MODE_CSS = <<<'CSS'
@media (min-height: @prefer-light-color-scheme),
@media (min-height: @prefer-light-color-scheme), print,
(prefers-color-scheme: light) and (min-height: @enable-color-preference) {
%s
}

View File

@ -1,11 +1,35 @@
/*! Icinga Web 2 | (c) 2015 Icinga GmbH | GPLv2+ */
@media print {
#sidebar,
#migrate-popup, // Icinga DB Web
.controls,
.footer, // ipl
.dontprint, // Compat only, use dont-print instead
.dont-print {
display: none !important;
}
#main > .container {
overflow: visible !important;
> .content {
overflow: visible !important;
}
}
:root {
--body-bg-color: #fff !important;
--text-color: #535353 !important;
--text-color-light: #7F7F7F !important;
--tr-active-color: #fff !important;
--tr-hover-color: #fff !important;
// ipl-web overrides
--default-bg: #fff !important;
--default-text-color: #535353 !important;
--default-text-color-inverted: #fff !important;
}
}
@media not print {

View File

@ -540,7 +540,7 @@ LESS
{
$this->assertEquals(
<<<CSS
@media (min-height: 999999px), (prefers-color-scheme: light) and (min-height: 999999px) {
@media (min-height: 999999px), print, (prefers-color-scheme: light) and (min-height: 999999px) {
:root {
--my-color: orange;
}