标记串 /标记符号中的语义令牌
是否可以使用MarkDownString
/使用
code
或pre> pre
带有span
在悬停
中模仿语义令牌?如果是这样,是否可以仅使用span
元素上的CSS访问用户主题的颜色?理想情况下,我想避免使用特定于Vscode的任何东西。
我看到 https://github.com/microsoft.com/microsoft/vscope/sissues/issues/97409 没有解决方案。
Is it possible to use MarkdownString
/MarkupContent
with code
or pre
with span
to emulate semantic tokens in Hover
? If so, is it possible to access the colors from the user's theme using only the CSS on the span
elements? Ideally I would like to avoid using anything VSCode specific.
I saw https://github.com/microsoft/vscode/issues/97409 but there was no solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果要手动为代码设置颜色,则可以尝试以下操作:
< pre>
也有效,而不是< code>
,但我认为<代码>
看起来更好。If you want to manually set colors for code you can try this:
<pre>
also works, instead of<code>
, but I think<code>
looks better.