Closed mashirozx closed 2 years ago
You can't. VSCode literally blocks all external file references now. See #148. Closing.
Does that mean this plugin won't be maintained anymore?
Well, VSCode currently blocks all external CSS/JS from loading unless it is inlined. So your feature request is not doable.
Well, I mean something like this:
// settings.json
{
"vscode_custom_css.imports": "body { background: yellow; }",
}
That should be under another property...
haha
But do you really think it is a good idea? Currently, the extension is able to load web resources (you can write http://your-sync-disk/whatever.js
in imports
).
Not working here...
Do you have error messages (Ctrl-Shift-I
)
No error from this plugin
Please execute Enable Custom CSS and JS
and see whether there are any error messages.
Still the same
Version: 1.62.3 (user setup) Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 Date: 2021-11-17T08:11:14.551Z Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19042
Hmm the extension failed to load your file. Reason
FetchError: request to https://ngx.moezx.cc/share/vscode-injection-css.css failed, reason: certificate has expired
Wow, thanks a lot, I've disabled the https, and it works fine. 💖
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.
既然现在也是以inline的形式注入的,那么何不考虑一下直接支持在配置文件里面书写css,无非也就是当做一个字符串处理,这样的好处是便于同步,切换设备的时候不用再考虑迁移本地的样式文件。