yzhang-gh / vscode-markdown

Markdown All in One
https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
MIT License
2.84k stars 322 forks source link

Use link reference to css file instead of embedded style option? #1429

Open Norlandz opened 1 month ago

Norlandz commented 1 month ago

Proposal

Use link reference to css file instead of embedded style option?

I rather to have <link rel="stylesheet" type="text/css" href="file:///c%3A/aaa/markdown.css"> instead of embedded <style>. Is there an option to change it?

Other information

Kinda like the opposite of https://github.com/yzhang-gh/vscode-markdown/issues/57

yzhang-gh commented 1 month ago

You can make use of the markdown.styles option (which is provided by VS Code itself). It is used in both VS Code preview and the exported HTML.

Norlandz commented 1 month ago

You can make use of the markdown.styles option (which is provided by VS Code itself). It is used in both VS Code preview and the exported HTML.

Yes I know that option, but isnt that is irrelevant? It dose add styles to the html. But what I want is to have an option for the added style to be embedded / inline / linked.


My current workaround is just use old style html -- manually adding <link css> to my md file, and disable the markdown.styles option.

This seems ok, it also solves my another problem: https://github.com/yzhang-gh/vscode-markdown/issues/1427 Auto print to html when css file is changed.

But still, idk if there is a better design.


My wording for "inline" style was incorrect, should have said "embedded" style. I dont think "inline" style is ever supported.