Skip to content

Instantly share code, notes, and snippets.

@enihsyou
Last active February 3, 2025 11:45
Show Gist options
  • Save enihsyou/9e730a79b94ac2afd28e9b21a6be0383 to your computer and use it in GitHub Desktop.
Save enihsyou/9e730a79b94ac2afd28e9b21a6be0383 to your computer and use it in GitHub Desktop.
VSCode custom CSS imports content
/* vscode/src/vs/workbench/contrib/terminal/browser/media/terminal.css */
/* 从放置在底部的终端面板中移除顶部的空白
在窗口多余空间不满一行的时候 这个空白尤为明显
会让顶部文本和边框之间产生一段空隙 */
.monaco-workbench .editor-instance .xterm,
.monaco-workbench .pane-body.integrated-terminal .xterm {
bottom: unset;
top: 0;
}
/* vscode/src/vs/editor/browser/widget/codeEditorWidget.ts */
/* 由 microsoft/vscode#44141 引入的 no-repeat 设置
让 hint 下划线只有第一个字符短短的一截
是故意这么做的,避免 SpellChecker 的检测结果不要划地到处都是 */
/* 回归默认,控制哪些被归类为 Info 级别,这效果可以减少编辑器里的提示噪音 */
/*
.monaco-workbench .squiggly-hint {
background-repeat: repeat-x;
}
*/
/* vscode/src/vs/workbench/browser/media/style.css */
/* 修改UI字体, Maple Mono 比较圆润可爱
但要应用起来比较麻烦,早年的 Custom UI 插件已经失效,2024 最新方法是
https://github.com/subframe7536/vscode-custom-ui-style
配合 Window Zoom Level >= 2.0 在 Windows LoDPI 屏幕上使用较好 */
/* 已移动到插件 settings.json 中, 所以这段不再需要了
"custom-ui-style.font.monospace": "Maple Mono NF CN"
"custom-ui-style.font.sansSerif": "Maple UI" */
/*
.windows:lang(zh-Hans) {
font-family: "Segoe WPC", "Segoe UI", "Maple Mono NF CN", "Microsoft YaHei", sans-serif;
}
*/
@enihsyou
Copy link
Author

enihsyou commented Oct 18, 2022

使用方式:

  1. 添加 be5invis/vscode-custom-css 插件
  2. 在 settings.json 中添加或定位到 vscode_custom_css.imports 把当前文件的地址填入
  3. 在 vscode 中执行 Enable Custom CSS and JS 插件动作, 触发更新

上面的插件许久未更新已经失效了,在 2024 年这个节点可以换用 subframe7536/vscode-custom-ui-style 插件,操作类似

开发维护:

~/.dotfiles/vscode 中保存源码并同步到这里, 之后需要用户手动触发更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment