be5invis / vscode-custom-css

Custom CSS Plugin for Visual Studio Code. Based on vscode-icon
MIT License
832 stars 58 forks source link

[Feature request] write css in config file directly #157

Closed mashirozx closed 2 years ago

mashirozx commented 2 years ago

既然现在也是以inline的形式注入的,那么何不考虑一下直接支持在配置文件里面书写css,无非也就是当做一个字符串处理,这样的好处是便于同步,切换设备的时候不用再考虑迁移本地的样式文件。

be5invis commented 2 years ago

You can't. VSCode literally blocks all external file references now. See #148. Closing.

mashirozx commented 2 years ago

Does that mean this plugin won't be maintained anymore?

be5invis commented 2 years ago

Well, VSCode currently blocks all external CSS/JS from loading unless it is inlined. So your feature request is not doable.

mashirozx commented 2 years ago

Well, I mean something like this:

// settings.json
{
  "vscode_custom_css.imports": "body { background: yellow; }",
}
be5invis commented 2 years ago

That should be under another property...

mashirozx commented 2 years ago

haha

be5invis commented 2 years ago

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).

mashirozx commented 2 years ago

Not working here... image

be5invis commented 2 years ago

Do you have error messages (Ctrl-Shift-I)

mashirozx commented 2 years ago

No error from this plugin image image

be5invis commented 2 years ago

Please execute Enable Custom CSS and JS and see whether there are any error messages.

mashirozx commented 2 years ago

Still the same

mashirozx commented 2 years ago

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

be5invis commented 2 years ago

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
mashirozx commented 2 years ago

Wow, thanks a lot, I've disabled the https, and it works fine. 💖

github-actions[bot] commented 2 years ago

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.