Skip to content

Commit 3782d65

Browse files
author
Benjamin Pasero
committed
web - firefox fit-content is -moz-fit-content
1 parent b2fd9bf commit 3782d65

9 files changed

Lines changed: 12 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178

179179
.monaco-workbench .dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button {
180180
max-width: fit-content;
181+
max-width: -moz-fit-content;
181182
padding: 5px 10px;
182183
margin: 4px 5px; /* allows button focus outline to be visible */
183184
overflow: hidden;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { Range, IRange } from 'vs/base/common/range';
2020
import { equals, distinct } from 'vs/base/common/arrays';
2121
import { DataTransfers, StaticDND, IDragAndDropData } from 'vs/base/browser/dnd';
2222
import { disposableTimeout, Delayer } from 'vs/base/common/async';
23+
import { isFirefox } from 'vs/base/browser/browser';
2324

2425
interface IItem<T> {
2526
readonly id: string;
@@ -595,7 +596,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
595596
return;
596597
}
597598

598-
item.row.domNode.style.width = 'fit-content';
599+
item.row.domNode.style.width = isFirefox ? '-moz-fit-content' : 'fit-content';
599600
item.width = DOM.getContentWidth(item.row.domNode);
600601
const style = window.getComputedStyle(item.row.domNode);
601602

src/vs/base/parts/tree/browser/treeView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class ViewItem implements IViewItem {
265265
}
266266

267267
if (this.context.horizontalScrolling) {
268-
this.element.style.width = 'fit-content';
268+
this.element.style.width = Browser.isFirefox ? '-moz-fit-content' : 'fit-content';
269269
}
270270

271271
try {
@@ -289,7 +289,7 @@ export class ViewItem implements IViewItem {
289289

290290
const style = window.getComputedStyle(this.element);
291291
const paddingLeft = parseFloat(style.paddingLeft!);
292-
this.element.style.width = 'fit-content';
292+
this.element.style.width = Browser.isFirefox ? '-moz-fit-content' : 'fit-content';
293293
this.width = DOM.getContentWidth(this.element) + paddingLeft;
294294
this.element.style.width = '';
295295
}

src/vs/workbench/browser/parts/editor/media/editorstatus.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@
4848
padding-right: 12px;
4949
margin-right: 5px;
5050
max-width: fit-content;
51+
max-width: -moz-fit-content;
5152
}

src/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@
5353
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit {
5454
width: 120px;
5555
min-width: fit-content;
56+
min-width: -moz-fit-content;
5657
}
5758

5859
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink {
5960
min-width: 60px;
6061
flex-basis: 0; /* all tabs are even */
6162
flex-grow: 1; /* all tabs grow even */
6263
max-width: fit-content;
64+
max-width: -moz-fit-content;
6365
}
6466

6567
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-button-left::after,

src/vs/workbench/browser/parts/notifications/media/notificationsList.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107

108108
.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button {
109109
max-width: fit-content;
110+
max-width: -moz-fit-content;
110111
padding: 5px 10px;
111112
margin: 4px 5px; /* allows button focus outline to be visible */
112113
font-size: 12px;

src/vs/workbench/contrib/debug/browser/media/debugViewlet.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
flex: 1;
225225
flex-shrink: 0;
226226
min-width: fit-content;
227+
min-width: -moz-fit-content;
227228
}
228229

229230
.debug-viewlet .debug-call-stack .stack-frame.subtle {

src/vs/workbench/contrib/extensions/browser/media/extensionsViewlet.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
font-size: 80%;
192192
padding-left: 6px;
193193
min-width: fit-content;
194+
min-width: -moz-fit-content;
194195
}
195196

196197
.extensions-viewlet:not(.narrow) > .extensions .extension > .details > .header-container > .header > .version {

src/vs/workbench/contrib/files/browser/media/explorerviewlet.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363

6464
.explorer-viewlet .panel-header .count {
6565
min-width: fit-content;
66+
min-width: -moz-fit-content;
6667
display: flex;
6768
align-items: center;
6869
}

0 commit comments

Comments
 (0)