diff --git a/library/Icinga/Less/Visitor.php b/library/Icinga/Less/Visitor.php index 2b574febf..48417c850 100644 --- a/library/Icinga/Less/Visitor.php +++ b/library/Icinga/Less/Visitor.php @@ -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 } diff --git a/public/css/icinga/print.less b/public/css/icinga/print.less index c610d2d7b..75d47284b 100644 --- a/public/css/icinga/print.less +++ b/public/css/icinga/print.less @@ -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 { diff --git a/test/php/library/Icinga/Util/LessParserTest.php b/test/php/library/Icinga/Util/LessParserTest.php index 7f36c52cb..74fcf7905 100644 --- a/test/php/library/Icinga/Util/LessParserTest.php +++ b/test/php/library/Icinga/Util/LessParserTest.php @@ -540,7 +540,7 @@ LESS { $this->assertEquals( <<