mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
border around scrollable area
This commit is contained in:
@@ -230,18 +230,15 @@ export const activate: ActivationFunction<void> = (ctx) => {
|
||||
-ms-user-select: text;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
.output > span.scrollable {
|
||||
overflow-y: scroll;
|
||||
max-height: var(--notebook-cell-output-max-height);
|
||||
}
|
||||
.output > span.output-stream.more-above {
|
||||
box-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset
|
||||
}
|
||||
.output > span.output-stream.more-below {
|
||||
box-shadow: var(--vscode-scrollbar-shadow) 0px -6px 6px -6px inset
|
||||
}
|
||||
.output > span.output-stream.more-above.more-below {
|
||||
box-shadow: var(--vscode-scrollbar-shadow) 0px -6px 6px -6px inset, var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset
|
||||
border: var(--vscode-editorWidget-border);
|
||||
border-style: solid;
|
||||
padding-left: 4px;
|
||||
margin-left: -4px;
|
||||
margin-right: -4px;
|
||||
}
|
||||
.output-plaintext .code-bold,
|
||||
.output-stream .code-bold,
|
||||
|
||||
@@ -51,23 +51,6 @@ function truncatedArrayOfString(id: string, buffer: string[], linesLimit: number
|
||||
|
||||
function scrollableArrayOfString(id: string, buffer: string[], container: HTMLElement) {
|
||||
container.classList.add('scrollable');
|
||||
container.classList.add('more-below');
|
||||
|
||||
// disposable?
|
||||
container.onscroll = (e) => {
|
||||
const target = e.target as HTMLElement;
|
||||
if (target.scrollTop === 0) {
|
||||
container.classList.remove('more-above');
|
||||
} else {
|
||||
container.classList.add('more-above');
|
||||
}
|
||||
|
||||
if (target.scrollTop + target.clientHeight === target.scrollHeight) {
|
||||
container.classList.remove('more-below');
|
||||
} else {
|
||||
container.classList.add('more-below');
|
||||
}
|
||||
};
|
||||
|
||||
if (buffer.length > 5000) {
|
||||
container.appendChild(generateViewMoreElement(id, false));
|
||||
|
||||
Reference in New Issue
Block a user