From 229de52669c4038dd03c739014bcb9cfc390e00b Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Sun, 26 Jan 2025 16:58:47 -0500 Subject: [PATCH] improve PDFs Signed-off-by: DanRoscigno --- docs/docusaurus/src/css/custom.css | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/docusaurus/src/css/custom.css b/docs/docusaurus/src/css/custom.css index b3c2fc55b5b96..999e225db84fc 100644 --- a/docs/docusaurus/src/css/custom.css +++ b/docs/docusaurus/src/css/custom.css @@ -85,22 +85,26 @@ a { var(--ifm-transition-timing-default); } -/* When we generate PDF files we do not need to show the feedback widget. */ +/* When we generate PDF files: + + - avoid breaks in the middle of: + - code blocks + - admonitions (notes, tips, etc.) + + - we do not need to show the: + - feedback widget. + - edit this page + - breadcrumbs + + */ @media print { - .theme-edit-this-page { - display: none; - } + .theme-code-block , .theme-admonition { + break-inside: avoid; + } } + @media print { - .feedback_Ak7m { + .theme-edit-this-page , .feedback_Ak7m , .theme-doc-breadcrumbs { display: none; } - - .theme-doc-footer-edit-meta-row { - display: none; - }; - - .breadcrumbs { - display: none; - }; }