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

[Question] 是否不支持ipynb的背景显示? #445

Open
738NGX opened this issue Mar 8, 2024 · 1 comment
Open

[Question] 是否不支持ipynb的背景显示? #445

738NGX opened this issue Mar 8, 2024 · 1 comment
Labels

Comments

@738NGX
Copy link

738NGX commented Mar 8, 2024

Summary | 概述

有一个问题是,虽然在其他代码文件中背景图片都能正常显示出来,但是遇到ipynb文件时,则没有图片显示。这是我独有的bug还是本身就不支持?如果不支持的话,希望以后可以添加这个功能,让ipynb也支持显示背景。

Versions

  • OS(Win10 / Mac OSX / Linux):Windows11
  • vscode:1.87.0

QQ截图20240308084932
QQ截图20240308085021

@738NGX 738NGX added the question label Mar 8, 2024
@suiyun39
Copy link
Collaborator

suiyun39 commented Mar 8, 2024

在编辑 ipynb 时,vscode 没有使用通用的编辑区,而是用 iframe 单独渲染了另一个 vscode-webview,因此插件生成的样式没有匹配。你可以把这两者理解为:设置的「UI 视图」和「JSON 视图」

且这个 webview 没有加载任何外部样式表,其中的样式是直接附加在 HTML 上的。虽然能通过调整包裹容器的样式加上一些背景,但无法做到很精细的控制。最终的结果是虽然能显示背景图片,但会被上层的元素覆盖掉且无法调整。

目前全屏背景倒是能正常工作,编辑区背景的话有时间我研究一下,如果能得到比较好的效果的话,这个功能会被加上。如果没办法做到很好的显示效果,那这个功能不会出现在 Release 中。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants