深色主题背景颜色修改:
body.vscode-dark { background-color: black; }
浅色主题背景颜色修改:
body.vscode-light { background-color: white; }
根据不同主题色来适配控件颜色:
.vscode-dark .btn-style { margin: 20px 20px 0px 0px; color: white; overflow: visible; } .btn-style { margin: 20px 20px 0px 0px; color: black; overflow: visible; }
vscode如果有2个控件同时起作用,需要同时指定:
// 深色主题 .vscode-dark input[readonly], .vscode-dark select[readonly] { background:rgb(51, 51, 51) !important; border: 1px solid #4f4f4f !important; box-shadow: none !important; color:rgba(153, 153, 153, 0.7); } // 浅色主题 input[readonly],select[readonly] { background:white !important; border: 1px solid #4f4f4f !important; box-shadow: none !important; color:rgba(153, 153, 153, 0.7); }