简体   繁体   English

Visual Studio Code Markdown 预览样式

[英]Visual Studio Code Markdown preview styles

I know how to use markdown-styles in settings to supply my own CSS for styling Markdown previews, but I don't know what elements and CSS classes to style.我知道如何在设置中使用markdown-styles来提供我自己的 CSS 来样式化 Markdown 预览,但我不知道要设置哪些元素和 CSS 类。 Are the ones used in Markdown preview documented somewhere? Markdown 预览中使用的那些是否记录在某处?

  1. Open a Markdown file.打开一个 Markdown 文件。
  2. Open the split preview window ( Cmd + K , V on Mac, or the split view icon in the upper right-hand corner of the window, or open the command palette (menu ViewCommand Palette or Shift + Cmd + P on Mac) and run Markdown: open Preview to the side .打开拆分预览窗口(Mac 上为Cmd + KV或窗口右上角的拆分视图图标,或打开命令面板(菜单视图命令面板Shift + Cmd + P在 Mac 上)并运行Markdown: open Preview to side
  3. Open the command palette and run Developer: Open WEBVIEW developer tools .打开命令面板并运行Developer: Open WEBVIEW developer tools
  4. That will open a browser-like inspector, and you can drill down and see whatever you need there.这将打开一个类似浏览器的检查器,您可以向下钻取并查看您需要的任何内容。

Note that Toggle Developer Tools in the Help menu does not work for this — it does not drill down into the Preview's webview window.请注意, Help菜单中的Toggle Developer Tools对此不起作用——它不会深入到 Preview 的 webview 窗口。

From the documentation : 文档

Working with Markdown files in Visual Studio Code is simple, straightforward, and fun. 在Visual Studio Code中使用Markdown文件简单,直接且有趣。 Besides Visual Studio Code's basic editing, there are a number of Markdown specific features that will help you be more productive. 除了Visual Studio Code的基本编辑功能外,还有许多Markdown特定功能可以帮助您提高工作效率。

Go through that documentation . 浏览该文档

You can use vr8ce ’s helpful answer to find the source of the default stylesheet.您可以使用vr8ce的有用答案来查找默认样式表的来源。 On the Mac, this is the path:在 Mac 上,这是路径:

/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/extensions/markdown-language-features/media/markdown.css

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM