-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recognize pdf.less and use the style.css of the wrap plugin by default #325
Conversation
The wrap plugin's styles are sufficiently simple that mpdf can handle them. Also the print-styles of wrap are very bland, which constitutes a great loss for a plugin with a main focus of colorful styling. Finally the wrap plugin is widely spread, hence many users will benefit from this.
Well spotted! |
I've merged the changes to the Wrap plugin, so that will be available in the next release. After I made some other changes, I thought I could just add |
Hmm just a wild guess, but it might be that the import path for less imports isn't properly set while handling plugin styles in dw2pdf... |
The other change I made was to move overlapping styles between print and pdf styles into their own LESS file and import it in the print and pdf styles and that works. (See selfthinker/dokuwiki_plugin_wrap@9c20817) |
Fixed it in selfthinker/dokuwiki_plugin_wrap#167 I think. |
Thanks. As mentioned on that PR, it works much better but still has issues. Background images are not showing, which is maybe not very surprising. But two styles are also not displayed correctly (spoiler and default box) which doesn't make much sense as the rest is fine. |
I just realised why the two styles are not showing while the rest is: They are the only ones which include CSS placeholders. |
Ok, the reason for the problems is in the following lines: dokuwiki-plugin-dw2pdf/action.php Lines 743 to 756 in 8c09f0a
The replacement of the relative urls for the background images is done in line 746, the replacement for the So workaround for the styles could be to use less placeholders, i.e. I'm not sure how to fix the images yet, because we cannot simply use the full path, because while that works in pdf, it then fails on screen. However, that could be fixed by moving the current styles in This problem might affect DokuWiki core as well? |
Thanks for looking into this. The potential solution to solve the images via |
No, because including a file via |
The wrap plugin's styles are sufficiently simple that mpdf can handle them. Also, the print-styles of wrap are very bland, which constitutes a great loss for a plugin with the main focus on colorful styling. Finally the wrap plugin is widely spread, hence many users will benefit from this.
For the best result, this depends on the merge of selfthinker/dokuwiki_plugin_wrap#156