Skip to content

Commit b3f3de9

Browse files
committed
border around scrollable area
1 parent 457e4d2 commit b3f3de9

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

extensions/notebook-renderers/src/index.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,15 @@ export const activate: ActivationFunction<void> = (ctx) => {
230230
-ms-user-select: text;
231231
cursor: auto;
232232
}
233+
233234
.output > span.scrollable {
234235
overflow-y: scroll;
235236
max-height: var(--notebook-cell-output-max-height);
236-
}
237-
.output > span.output-stream.more-above {
238-
box-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset
239-
}
240-
.output > span.output-stream.more-below {
241-
box-shadow: var(--vscode-scrollbar-shadow) 0px -6px 6px -6px inset
242-
}
243-
.output > span.output-stream.more-above.more-below {
244-
box-shadow: var(--vscode-scrollbar-shadow) 0px -6px 6px -6px inset, var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset
237+
border: var(--vscode-editorWidget-border);
238+
border-style: solid;
239+
padding-left: 4px;
240+
margin-left: -4px;
241+
margin-right: -4px;
245242
}
246243
.output-plaintext .code-bold,
247244
.output-stream .code-bold,

extensions/notebook-renderers/src/textHelper.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,6 @@ function truncatedArrayOfString(id: string, buffer: string[], linesLimit: number
5151

5252
function scrollableArrayOfString(id: string, buffer: string[], container: HTMLElement) {
5353
container.classList.add('scrollable');
54-
container.classList.add('more-below');
55-
56-
// disposable?
57-
container.onscroll = (e) => {
58-
const target = e.target as HTMLElement;
59-
if (target.scrollTop === 0) {
60-
container.classList.remove('more-above');
61-
} else {
62-
container.classList.add('more-above');
63-
}
64-
65-
if (target.scrollTop + target.clientHeight === target.scrollHeight) {
66-
container.classList.remove('more-below');
67-
} else {
68-
container.classList.add('more-below');
69-
}
70-
};
7154

7255
if (buffer.length > 5000) {
7356
container.appendChild(generateViewMoreElement(id, false));

0 commit comments

Comments
 (0)