Repository navigation
Closed as not planned
Labels
*out-of-scopePosted issue is not in scope of VS CodeaccessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesbugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitieswebviewWebview issues
Milestone
Description
This setting works by injecting some CSS here:
vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.ts
Lines 37 to 50 in 040c5df
| const rules = new Set<string>(); | |
| // Only add the styles if the feature is used | |
| if (opacity !== 1) { | |
| const filterRule = `filter: opacity(${opacity});`; | |
| // Terminal tabs | |
| rules.add(`.monaco-workbench .pane-body.integrated-terminal:not(:focus-within) .tabs-container { ${filterRule} }`); | |
| // Terminals | |
| rules.add(`.monaco-workbench .pane-body.integrated-terminal .xterm:not(.focus) { ${filterRule} }`); | |
| // Editors | |
| rules.add(`.monaco-workbench .editor-instance:not(:focus-within) .monaco-editor { ${filterRule} }`); | |
| } | |
| elStyle.textContent = [...rules].join('\n'); |
Webviews aren't part of the regular DOM structure though so I'm not sure the best way to do this. I tried this but it didn't work:
[data-parent-flow-to-element-id^=webview-editor-element] .webview:not(:focus-within) {
filter: opacity(0.5);
}I think we need a focused class on the iframe to be able to style this from the main document.
Metadata
Metadata
Labels
*out-of-scopePosted issue is not in scope of VS CodeaccessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesbugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitieswebviewWebview issues
Activity
Tyriar commentedon Aug 23, 2023
That's a bit outside my knowledge, all I know is that webview behave specially and are hosted outside of the editor tab content DOM tree
vs-code-engineering commentedon Dec 11, 2024
We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!