From 0cf0d4f4e7f7e256af88d42f54d05d7091f33e7e Mon Sep 17 00:00:00 2001 From: ych817 <105869179+ych817@users.noreply.github.com> Date: Tue, 29 Apr 2025 13:43:06 +1200 Subject: [PATCH] :lipstick: Style: hide scrollbar in print media (#594) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that the scrollbar will not appear in the printed PDF 确保打印出的 PDF 中没有 scrollbar --- assets/css/_core/_media.scss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/assets/css/_core/_media.scss b/assets/css/_core/_media.scss index 9c52ab3d..33cb204a 100644 --- a/assets/css/_core/_media.scss +++ b/assets/css/_core/_media.scss @@ -128,6 +128,23 @@ } @media only print { + + // 确保打印时没有 scrollbar + :root { + --fi-scrollbar-width: none !important; + } + + *::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + } + + .scrollbar-thin { + scrollbar-width: none !important; + -ms-overflow-style: none !important; + } + @page { size: A4 portrait; margin: 1.27cm;