be5invis / vscode-custom-css

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

Extension loads and does nothing #138

Closed apaz-cli closed 3 years ago

apaz-cli commented 3 years ago
code --version
1.54.1
f30a9b73e8ffc278e71575118b6bf568f04587c8
x64
/**settings.json*/
    "vscode_custom_css.staging_dir": "file:///home/apaz/.vscode/extensions/be5invis.vscode-custom-css-5.0.2/staging_dir/",
    "vscode_custom_css.imports": [
        "file:///home/apaz/.vscode/extensions/be5invis.vscode-custom-css-5.0.2/staging_dir/vscode_style.css"
    ],
    "vscode_custom_css.policy": true,

I created the directory and the file. When it can't find vscode_style.css the extension yells at me, so I figure that it finding the file must not be the issue. I've also chowned /usr/share/code and all of .vscode, so permissions shouldn't be an issue. Everything seems to go right, but the css is not applied. The extension host log prints no relevant messages either.

It likely doesn't matter, but here's the content of that css file.

/**vscode_style.css*/
body{
   pointer-events: auto !important;
   background-size: 100% !important;
   opacity: 0.97 !important;
   background-position: 0 0 !important;
   /* The file is present here also. */
   background-image: url('file:///home/apaz/Pictures/Icons-Resources/VSCode_BG.jpg');
   content: '';
   position: absolute;;
   z-index: 999;
   width: 100%;
   background-repeat: no-repeat;
}

With my old configuration broken, and now the new one broken, I'm not quite sure how to use the extension correctly anymore. Perhaps the readme could be updated. There's some outdated information on it.

be5invis commented 3 years ago

The path in vscode_custom_css.imports does not need to be contained inside vscode_custom_css.staging_dir. Actually, the extension will delete the staging dir before applying patches, so you should put the CSS file somewhere else, and use vscode_custom_css.imports to reference them: they will be copied to the staging dir.

However for the pictures, VSCode's current policy will block loading it, so you may need to place it into some HTTP-accessible place.

github-actions[bot] commented 3 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.