Skip to content
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

use default styles in pdf.less #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use default styles in pdf.less #167

wants to merge 1 commit into from

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