-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed as not planned
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesdebtCode quality issuesCode quality issuesworkbench-dim-unfocusedRelated to the accessibility.dimUnfocused.* featureRelated to the accessibility.dimUnfocused.* feature
Milestone
Description
It looks like today the editor dimming is done from the outside via explicit knowledge of CSS selectors which is prone to breaking easily. Every new editor would have to be adopted here. This should rather be an option that every editor has to support built-in and then this CSS patching should go away.
Refs:
vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.ts
Lines 38 to 62 in 35be9bf
if (opacity !== 1) { | |
// These filter rules are more specific than may be expected as the `filter` | |
// rule can cause problems if it's used inside the element like on editor hovers | |
const rules = new Set<string>(); | |
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 .terminal-wrapper:not(:focus-within) { ${filterRule} }`); | |
// Text editors | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .monaco-editor { ${filterRule} }`); | |
// Breadcrumbs | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .tabs-breadcrumbs { ${filterRule} }`); | |
// Terminal editors | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .terminal-wrapper { ${filterRule} }`); | |
// Settings editor | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .settings-editor { ${filterRule} }`); | |
// Keybindings editor | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .keybindings-editor { ${filterRule} }`); | |
// Editor placeholder (error case) | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .monaco-editor-pane-placeholder { ${filterRule} }`); | |
// Welcome editor | |
rules.add(`.monaco-workbench .editor-group-container:not(.active) .gettingStartedContainer { ${filterRule} }`); | |
cssTextContent = [...rules].join('\n'); | |
} |
//cc @jrieken
Metadata
Metadata
Assignees
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesdebtCode quality issuesCode quality issuesworkbench-dim-unfocusedRelated to the accessibility.dimUnfocused.* featureRelated to the accessibility.dimUnfocused.* feature