Skip to content

Conversation

@micgro42
Copy link
Contributor

@micgro42 micgro42 commented Mar 29, 2018

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.

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.
@micgro42
Copy link
Contributor Author

However, I'm not really sure why the .dokuwiki selectors are necessary in the first place. Shouldn't specificity be high enough without them?

@selfthinker
Copy link
Owner

selfthinker commented Mar 29, 2018

Ah, thanks. That explains why it wasn't working for me.
But this is not fully working either, the icons for the boxes and the background colour for the default box are missing and the spoiler is showing. (That is when DW2PDF's usestyles is empty.)
Weird, why would the result be any different to what's showing now with splitbrain/dokuwiki-plugin-dw2pdf#325 in place?

The .dokuwiki class is not there for specificity but for scoping the CSS so that it cannot interfere with CSS not coming from DokuWiki. It's further described on https://www.dokuwiki.org/devel:templates#dokuwiki_class.

@selfthinker
Copy link
Owner

I just realised what the pattern is. Apart from the images not loading, it is all the classes which include CSS color placeholders which are not working! E.g. the plain box includes __background_alt__ and __text__.

@selfthinker selfthinker mentioned this pull request Apr 8, 2018
@selfthinker
Copy link
Owner

I fixed the color placeholders not working in #172 as suggested in splitbrain/dokuwiki-plugin-dw2pdf#325.
It's still outstanding that the background images are not working. I'd rather not use the hacky solution suggested in the DW2PDF issue above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants