Skip to content

Commit 57080fa

Browse files
author
Benjamin Pasero
committed
debt - clean up and polish some CSS rules in base
1 parent 03d7041 commit 57080fa

30 files changed

Lines changed: 243 additions & 256 deletions

File tree

src/vs/base/browser/builder.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
.builder-hidden {
6+
.monaco-builder-hidden {
77
display: none !important;
88
visibility: hidden !important;
99
}
1010

11-
.builder-visible {
11+
.monaco-builder-visible {
1212
display: inherit;
1313
visibility: visible;
1414
}

src/vs/base/browser/builder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,8 @@ export class Builder implements IDisposable {
974974
* Shows the current element of the builder.
975975
*/
976976
public show(): Builder {
977-
if (this.hasClass('builder-hidden')) {
978-
this.removeClass('builder-hidden');
977+
if (this.hasClass('monaco-builder-hidden')) {
978+
this.removeClass('monaco-builder-hidden');
979979
}
980980

981981
this.attr('aria-hidden', 'false');
@@ -1013,8 +1013,8 @@ export class Builder implements IDisposable {
10131013
* Hides the current element of the builder.
10141014
*/
10151015
public hide(): Builder {
1016-
if (!this.hasClass('builder-hidden')) {
1017-
this.addClass('builder-hidden');
1016+
if (!this.hasClass('monaco-builder-hidden')) {
1017+
this.addClass('monaco-builder-hidden');
10181018
}
10191019
this.attr('aria-hidden', 'true');
10201020

@@ -1028,7 +1028,7 @@ export class Builder implements IDisposable {
10281028
* Returns true if the current element of the builder is hidden.
10291029
*/
10301030
public isHidden(): boolean {
1031-
return this.hasClass('builder-hidden') || this.currentElement.style.display === 'none';
1031+
return this.hasClass('monaco-builder-hidden') || this.currentElement.style.display === 'none';
10321032
}
10331033

10341034
private cancelVisibilityPromise(): void {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
.monaco-aria-container {
7-
position: absolute; /* try to hide from workbench but not from screen readers */
7+
position: absolute; /* try to hide from window but not from screen readers */
88
left:-999em;
99
}

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,29 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
.dropdown {
6+
.monaco-dropdown {
77
height: 100%;
8-
}
9-
10-
.dropdown, .dropdown-group {
118
display: inline-block;
129
padding: 0;
1310
}
1411

15-
.dropdown > .dropdown-label, .dropdown > .dropdown-action {
12+
.monaco-dropdown > .dropdown-label,
13+
.monaco-dropdown > .dropdown-action {
1614
display: inline-block;
1715
cursor: pointer;
1816
height: 100%;
1917
}
2018

21-
.dropdown > .dropdown-action {
19+
.monaco-dropdown > .dropdown-action {
2220
vertical-align: top;
2321
}
2422

25-
.dropdown > .dropdown-action > .action-label:hover {
23+
.monaco-dropdown > .dropdown-action > .action-label:hover {
2624
color: inherit;
2725
text-decoration: none;
2826
}
2927

30-
.dropdown > .dropdown-action, .dropdown > .dropdown-action > .action-label {
28+
.monaco-dropdown > .dropdown-action,
29+
.monaco-dropdown > .dropdown-action > .action-label {
3130
display: inline-block;
3231
}

src/vs/base/browser/ui/dropdown/dropdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class BaseDropdown extends ActionRunner {
3939

4040
this._toDispose = [];
4141

42-
this.$el = $('.dropdown').appendTo(container);
42+
this.$el = $('.monaco-dropdown').appendTo(container);
4343

4444
this.$label = $('.dropdown-label');
4545

src/vs/base/browser/ui/findinput/findInput.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
height: 25px;
1515
}
1616

17-
.fl:after {
18-
clear: both;
19-
content: '';
20-
display: block;
21-
visibility: hidden;
22-
height: 0;
23-
}
24-
2517
.monaco-findInput > .controls {
2618
position: absolute;
2719
top: 3px;

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
.progress-container {
5+
.monaco-progress-container {
66
width: 100%;
77
height: 5px;
88
}
99

10-
.progress-container .progress-bit {
10+
.monaco-progress-container .progress-bit {
1111
width: 2%;
1212
height: 5px;
1313
position: absolute;
1414
left: 0;
1515
display: none;
1616
}
1717

18-
.progress-container.active .progress-bit {
18+
.monaco-progress-container.active .progress-bit {
1919
display: inherit;
2020
}
2121

22-
.progress-container.discrete .progress-bit {
22+
.monaco-progress-container.discrete .progress-bit {
2323
left: 0;
2424
transition: width 100ms linear;
2525
-webkit-transition: width 100ms linear;
@@ -28,11 +28,11 @@
2828
-ms-transition: width 100ms linear;
2929
}
3030

31-
.progress-container.discrete.done .progress-bit {
31+
.monaco-progress-container.discrete.done .progress-bit {
3232
width: 100%;
3333
}
3434

35-
.progress-container.infinite .progress-bit {
35+
.monaco-progress-container.infinite .progress-bit {
3636
animation-name: progress;
3737
animation-duration: 4s;
3838
animation-iteration-count: infinite;
@@ -54,6 +54,4 @@
5454
@keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
5555
@-ms-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
5656
@-webkit-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
57-
@-moz-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
58-
59-
57+
@-moz-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }

src/vs/base/browser/ui/progressbar/progressbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const css_done = 'done';
1818
const css_active = 'active';
1919
const css_infinite = 'infinite';
2020
const css_discrete = 'discrete';
21-
const css_progress_container = 'progress-container';
21+
const css_progress_container = 'monaco-progress-container';
2222
const css_progress_bit = 'progress-bit';
2323

2424
export interface IProgressBarOptions extends IProgressBarStyles {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
.monaco-workbench .select-box {
6+
.monaco-select-box {
77
width: 100%;
88
height: 20px;
99
}

src/vs/base/browser/ui/selectBox/selectBoxCustom.css

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
/* Require .monaco-shell for ContextView dropdown */
7-
8-
.monaco-shell .select-box-dropdown-container {
6+
.monaco-select-box-dropdown-container {
97
display: none;
108
}
119

12-
.monaco-shell .select-box-dropdown-container.visible {
10+
.monaco-select-box-dropdown-container.visible {
1311
display: flex;
1412
flex-direction: column;
1513
text-align: left;
1614
width: 1px;
1715
overflow: hidden;
1816
}
1917

20-
.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container {
18+
.monaco-select-box-dropdown-container > .select-box-dropdown-list-container {
2119
flex: 0 0 auto;
2220
align-self: flex-start;
2321
padding-bottom: 1px;
@@ -33,30 +31,30 @@
3331
box-sizing: border-box;
3432
}
3533

36-
.monaco-shell.hc-black .select-box-dropdown-container > .select-box-dropdown-list-container {
34+
.hc-black .monaco-select-box-dropdown-container > .select-box-dropdown-list-container {
3735
padding-bottom: 4px;
3836
padding-top: 3px;
3937
}
4038

41-
.monaco-shell .select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-text {
39+
.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-text {
4240
text-overflow: ellipsis;
4341
overflow: hidden;
4442
padding-left: 3.5px;
4543
white-space: nowrap;
4644
}
4745

48-
.monaco-shell .select-box-dropdown-container > .select-box-dropdown-container-width-control {
46+
.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control {
4947
flex: 1 1 auto;
5048
align-self: flex-start;
5149
opacity: 0;
5250
}
5351

54-
.monaco-shell .select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div {
52+
.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div {
5553
overflow: hidden;
5654
max-height: 0px;
5755
}
5856

59-
.monaco-shell .select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div > .option-text-width-control {
57+
.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div > .option-text-width-control {
6058
padding-left: 4px;
6159
padding-right: 8px;
6260
white-space: nowrap;

0 commit comments

Comments
 (0)