From d0a7c8b2c2c7b8973acf36fb4fbc493170a1eb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 29 Mar 2018 17:19:42 +0200 Subject: [PATCH] feat: use default styles in pdf.less This allows to show the default styles in pdf documents created with dw2pdf without having to use explicitly add wrap to the screen styles enabled dwpw2pdf config option. The import is place outside of the .dokuwiki selector, since style.less already includes .dokuwiki selectors itself. For consistency the import of print_or_pdf.less is also moved outside of the selector. --- pdf.less | 5 +++-- print.less | 4 ++-- print_or_pdf.less | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pdf.less b/pdf.less index c3aca20..66170d2 100644 --- a/pdf.less +++ b/pdf.less @@ -3,10 +3,11 @@ Styles used in PDFs by the DW2PDF plugin (in addition to all.css, and the DW2PDF plugin also includes style.css via the 'usestyles' option) ********************************************************************/ -.dokuwiki { - +@import 'style.less'; @import 'print_or_pdf.less'; +.dokuwiki { + /*____________ only print ____________*/ /* due to including style.css, these need to be overwritten again */ diff --git a/print.less b/print.less index 5244d85..7fe0d8c 100644 --- a/print.less +++ b/print.less @@ -2,10 +2,10 @@ Print Styles for the Wrap Plugin (additional to all.css) ********************************************************************/ -.dokuwiki { - @import 'print_or_pdf.less'; +.dokuwiki { + /* boxes and notes with icons ********************************************************************/ diff --git a/print_or_pdf.less b/print_or_pdf.less index 7a6e646..ef8e94a 100644 --- a/print_or_pdf.less +++ b/print_or_pdf.less @@ -7,19 +7,19 @@ Styles shared between print.css and pdf.css /*____________ pagebreak ____________*/ -.wrap_pagebreak { +.dokuwiki .wrap_pagebreak { page-break-after: always; } /*____________ avoid page break ____________*/ /* not yet supported by most browsers */ -.wrap_nopagebreak { +.dokuwiki .wrap_nopagebreak { page-break-inside: avoid; } /*____________ no print ____________*/ -.wrap_noprint { +.dokuwiki .wrap_noprint { display: none; }