Skip to content

Commit e39f48a

Browse files
bpaseroCopilot
andauthored
debt - avoid .monaco-workbench outside workbench folder (microsoft#269656)
* debt - avoid outside folder * Update src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a111725 commit e39f48a

28 files changed

Lines changed: 70 additions & 79 deletions

File tree

src/vs/base/browser/ui/list/listWidget.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ export class DefaultStyleController implements IStyleController {
954954
content.push(`
955955
.monaco-drag-image${suffix},
956956
.monaco-list${suffix}:focus .monaco-list-row.focused,
957-
.monaco-workbench.context-menu-visible .monaco-list${suffix}.last-focused .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }
957+
.context-menu-visible .monaco-list${suffix}.last-focused .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }
958958
`);
959959
}
960960

@@ -1002,13 +1002,13 @@ export class DefaultStyleController implements IStyleController {
10021002
content.push(`
10031003
.monaco-table > .monaco-split-view2,
10041004
.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,
1005-
.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,
1006-
.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
1005+
.monaco-enable-motion .monaco-table:hover > .monaco-split-view2,
1006+
.monaco-enable-motion .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
10071007
border-color: ${styles.tableColumnsBorder};
10081008
}
10091009
1010-
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,
1011-
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
1010+
.monaco-enable-motion .monaco-table > .monaco-split-view2,
1011+
.monaco-enable-motion .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
10121012
border-color: transparent;
10131013
}
10141014
`);

src/vs/base/browser/ui/sash/sash.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
background: transparent;
112112
}
113113

114-
.monaco-workbench:not(.reduce-motion) .monaco-sash:before {
114+
.monaco-enable-motion .monaco-sash:before {
115115
transition: background-color 0.1s ease-out;
116116
}
117117

src/vs/base/browser/ui/splitview/paneview.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
transition-timing-function: ease-out;
117117
}
118118

119-
.reduce-motion .monaco-pane-view .split-view-view {
119+
.monaco-reduce-motion .monaco-pane-view .split-view-view {
120120
transition-duration: 0s !important;
121121
}
122122

src/vs/base/browser/ui/table/table.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
border-left: 1px solid transparent;
5252
}
5353

54-
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,
55-
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
54+
.monaco-enable-motion .monaco-table > .monaco-split-view2,
55+
.monaco-enable-motion .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
5656
transition: border-color 0.2s ease-out;
5757
}

src/vs/base/browser/ui/tree/abstractTree.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,10 +2870,10 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
28702870
content.push(`.monaco-list${suffix}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }`);
28712871
content.push(`.monaco-list${suffix}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`);
28722872

2873-
content.push(`.monaco-workbench.context-menu-visible .monaco-list${suffix}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }`);
2873+
content.push(`.context-menu-visible .monaco-list${suffix}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }`);
28742874

2875-
content.push(`.monaco-workbench.context-menu-visible .monaco-list${suffix}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`);
2876-
content.push(`.monaco-workbench.context-menu-visible .monaco-list${suffix}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`);
2875+
content.push(`.context-menu-visible .monaco-list${suffix}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`);
2876+
content.push(`.context-menu-visible .monaco-list${suffix}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`);
28772877
}
28782878

28792879
this.styleElement.textContent = content.join('\n');

src/vs/base/browser/ui/tree/media/tree.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
opacity: 0;
3434
}
3535

36-
.monaco-workbench:not(.reduce-motion) .monaco-tl-indent > .indent-guide {
36+
.monaco-enable-motion .monaco-tl-indent > .indent-guide {
3737
transition: opacity 0.1s linear;
3838
}
3939

@@ -86,7 +86,7 @@
8686
border-bottom-right-radius: 4px;
8787
}
8888

89-
.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter {
89+
.monaco-enable-motion .monaco-tree-type-filter {
9090
transition: top 0.3s;
9191
}
9292

src/vs/editor/contrib/find/browser/findWidget.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
background-color: var(--vscode-editorWidget-background);
2525
}
2626

27-
.monaco-workbench.reduce-motion .monaco-editor .find-widget {
27+
.monaco-reduce-motion .monaco-editor .find-widget {
2828
transition: transform 0ms linear;
2929
}
3030

@@ -41,7 +41,7 @@
4141
display: flex;
4242
}
4343

44-
.monaco-editor .find-widget.visible {
44+
.monaco-editor .find-widget.visible {
4545
transform: translateY(0);
4646
}
4747

@@ -101,7 +101,7 @@
101101
.monaco-editor .find-widget .monaco-findInput {
102102
vertical-align: middle;
103103
display: flex;
104-
flex:1;
104+
flex: 1;
105105
}
106106

107107
.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {
@@ -201,7 +201,7 @@
201201

202202
/* REDUCED */
203203
.monaco-editor .find-widget.reduced-find-widget .matchesCount {
204-
display:none;
204+
display: none;
205205
}
206206

207207
/* NARROW (SMALLER THAN REDUCED) */
@@ -219,7 +219,7 @@
219219
.monaco-editor .find-widget.collapsed-find-widget .button.replace,
220220
.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,
221221
.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {
222-
display:none;
222+
display: none;
223223
}
224224

225225
.monaco-editor .find-widget.no-results .matchesCount {

src/vs/editor/contrib/folding/browser/folding.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
margin-left: 2px;
1717
}
1818

19-
.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,
20-
.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,
21-
.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,
22-
.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed {
19+
.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,
20+
.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,
21+
.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,
22+
.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed {
2323
transition: initial;
2424
}
2525

src/vs/platform/accessibility/browser/accessibilityService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export class AccessibilityService extends Disposable implements IAccessibilitySe
7070

7171
const updateRootClasses = () => {
7272
const reduce = this.isMotionReduced();
73-
this._layoutService.mainContainer.classList.toggle('reduce-motion', reduce);
74-
this._layoutService.mainContainer.classList.toggle('enable-motion', !reduce);
73+
this._layoutService.mainContainer.classList.toggle('monaco-reduce-motion', reduce);
74+
this._layoutService.mainContainer.classList.toggle('monaco-enable-motion', !reduce);
7575
};
7676

7777
updateRootClasses();

src/vs/workbench/browser/actions/media/actions.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
text-overflow: ellipsis;
3636
}
3737

38-
.monaco-workbench:not(.reduce-motion) .screencast-keyboard {
38+
.monaco-workbench.monaco-enable-motion .screencast-keyboard {
3939
transition: opacity 0.3s ease-out;
4040
}
4141

0 commit comments

Comments
 (0)