Argon-Dokuwiki-Template
Argon-Dokuwiki-Template copied to clipboard
All local pdf links are display:flex, preventing inline links
Placing a link to a local PDF results in the link class being set to media, which is display: flex. This means it is impossible to have an inline link to a local PDF (as far as I can tell, anyway) as display:flex causes line breaks both before and after the link. What is the best way to fix that? I can just delete the display: flex line in the css file, but maybe there is another option that makes more sense.
Thanks. I'll look into it today.
I added this to the stylesheet
.mf_pdf {
display: inline;
}
I guess this needs to be done for other formats as well which are recognized by dokuwiki but unlike images there is no preview.
I just took a peek at the dokuwiki documentation. There is a ?linkonly option that can be added to embedded media links, presumably to remove the preview. However, if I add that to the pdf links, they are still showing up display: flex. This also appears to be the case for image links, which similarly prevents inlining the links.
I did notice something interesting, though: images seem to appear with class "media" only, but the PDF links and images with ?linkonly seem to appear with classes "media", "mediafile", and "mf_something". So maybe mediafile should override display:flex with display:inline. Or perhaps display:flex should only apply to "img" tags or other embed tags but not the "a" tag.