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

Allow online (https) CSS in markdown-pdf.styles #67

Open
vimtaai opened this issue Apr 18, 2018 · 5 comments
Open

Allow online (https) CSS in markdown-pdf.styles #67

vimtaai opened this issue Apr 18, 2018 · 5 comments
Milestone

Comments

@vimtaai
Copy link
Contributor

vimtaai commented Apr 18, 2018

It would be nice to be able to include online CSS without the need to have a local copy.

"markdown-pdf.styles": [
  "https://unpkg.com/mdss"
]

Sadly this is not working.

yzane added a commit that referenced this issue Apr 21, 2018
@yzane
Copy link
Owner

yzane commented Apr 21, 2018

"markdown-pdf.styles": [
  "https://unpkg.com/mdss"
]

The CSS is applied correctly in JPG and PNG, but there is a problem with the PDF.
For now, I will release it as a known issue.

@Haenkos
Copy link

Haenkos commented Feb 22, 2021

A missing semicolon in the '@media print' rule of the linked stylesheet at https://unpkg.com/mdss is causing problems with PDF-export (paragraph text not showing). At the first instance of the '@media print' rule, a semicolon is missing after the 'body{color:#000}' attribute. Adding a semicolon fixes the problem of paragraph text not showing. See also issue #240 .

@vimtaai
Copy link
Contributor Author

vimtaai commented Feb 22, 2021

A missing semicolon in the '@media print' rule of the linked stylesheet at https://unpkg.com/mdss is causing problems with PDF-export (paragraph text not showing). At the first instance of the '@media print' rule, a semicolon is missing after the 'body{color:#000}' attribute. Adding a semicolon fixes the problem of paragraph text not showing. See also issue #240 .

This issue is for the mdss package (that I maintain), not this one. I don't think the problem is the missing semicolon (the CSS is syntaxically OK), but the lazy loading of fonts in the print preview of Chromium browsers. It is a known issue that fonts only show up on the second rendering in the print preview dialog if they were loaded from a CDN.

@Haenkos
Copy link

Haenkos commented Feb 22, 2021

Ah, okay my bad. I'm still pretty inexperienced. Putting a semicolon at the mentioned place did make some black paragraph text show up so i thought i had found something there. :-)

Should i delete my previous comment (and subsequently this one), or is it worth leaving it up for whatever reason?

@vimtaai
Copy link
Contributor Author

vimtaai commented Feb 22, 2021

@Haenkos No problem 🙂 Your problem was probably solved by reloading the print preview rather than the added semicolon.

As for the comment I think it can stay. 🙂

tat3 pushed a commit to tat3/vscode-markdown-pdf-2 that referenced this issue Sep 4, 2022
tat3 pushed a commit to tat3/vscode-markdown-pdf-2 that referenced this issue Sep 4, 2022
tat3 pushed a commit to tat3/vscode-markdown-pdf-2 that referenced this issue Sep 4, 2022
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

No branches or pull requests

3 participants