-
Notifications
You must be signed in to change notification settings - Fork 1.3k
More scrollbar fixes and some CSS cleanup #10300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
96d2459
c1591dd
6beed48
e35815f
2e09dbb
7e400ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,6 @@ | ||
| /* Import common styles and then override them below */ | ||
| @import "../interactive-common/common.css"; | ||
|
|
||
| :root { | ||
| --messages-offset-px: 20px; | ||
| --output-offset-px: 45px; | ||
| } | ||
|
|
||
| .toolbar-menu-bar-child { | ||
| background: var(--override-background, var(--vscode-editor-background)); | ||
| z-index: 10; | ||
|
|
@@ -19,7 +14,7 @@ | |
| } | ||
|
|
||
| .messages-result-container { | ||
| width: calc(100vw - var(--messages-offset-px)); | ||
| width: 100%; | ||
| } | ||
|
|
||
| .messages-result-container pre { | ||
|
|
@@ -38,19 +33,20 @@ | |
| .cell-result-container { | ||
| margin: 0px; | ||
| display: grid; | ||
| grid-auto-columns: minmax(0, 1fr); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A few cases of this were long content was blowing out our grid cells. |
||
| } | ||
|
|
||
| .cell-outer { | ||
| display:grid; | ||
| grid-template-columns: auto 1fr 8px; | ||
| grid-template-columns: auto minmax(0, 1fr) 8px; | ||
| grid-column-gap: 3px; | ||
| width: 100%; | ||
| } | ||
|
|
||
|
|
||
| .cell-output { | ||
| margin: 0px; | ||
| width: calc(100vw - var(--output-offset-px)); | ||
| width: 100%; | ||
| overflow-x: scroll; | ||
| background: transparent; | ||
| } | ||
|
|
@@ -68,7 +64,7 @@ xmp { | |
| } | ||
|
|
||
| .markdown-cell-output { | ||
| width: calc(100vw - var(--output-offset-px)); | ||
| width: 100%; | ||
| overflow-x: scroll; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,14 @@ export function buildSettingsCss(settings: IDataScienceExtraSettings | undefined | |
| return settings | ||
| ? `#main-panel-content::-webkit-scrollbar { | ||
| width: ${settings.extraSettings.editor.verticalScrollbarSize}px; | ||
| } | ||
|
|
||
| .cell-output::-webkit-scrollbar { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in H support as well. |
||
| height: ${settings.extraSettings.editor.horizontalScrollbarSize}px; | ||
| } | ||
|
|
||
| .cell-output > *::-webkit-scrollbar { | ||
| width: ${settings.extraSettings.editor.verticalScrollbarSize}px; | ||
| }` | ||
| : ''; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,7 @@ body, html { | |
| /* Cell */ | ||
| .cell-wrapper { | ||
| margin: 0px; | ||
| padding: 2px; | ||
| padding: 2px 5px 2px 2px; | ||
| display: block; | ||
| } | ||
|
|
||
|
|
@@ -310,14 +310,10 @@ body, html { | |
| } | ||
|
|
||
| #cell-table { | ||
| display: table; | ||
| display: block; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We had an extra cell-table / cell-table div group that looked like a remnant from an earlier layout. |
||
| width: 100%; | ||
| } | ||
|
|
||
| #cell-table-body { | ||
| display: table-row-group; | ||
| } | ||
|
|
||
| .flash { | ||
| animation-name: flash-animation; | ||
| animation-duration: 1.0s; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -624,7 +624,7 @@ export class NativeCell extends React.Component<INativeCellProps> { | |
| private renderInput = () => { | ||
| if (this.shouldRenderInput()) { | ||
| return ( | ||
| <div> | ||
| <div className="cell-input-wrapper"> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wrappers let us place the entire input unit into the containing grid correctly (this is the issue I was talking about on the whiteboard in particular) |
||
| {this.renderMiddleToolbar()} | ||
| <CellInput | ||
| cellVM={this.props.cellVM} | ||
|
|
@@ -674,7 +674,7 @@ export class NativeCell extends React.Component<INativeCellProps> { | |
| const toolbar = this.props.cellVM.cell.data.cell_type === 'markdown' ? this.renderMiddleToolbar() : null; | ||
| if (this.shouldRenderOutput()) { | ||
| return ( | ||
| <div> | ||
| <div className="cell-output-wrapper"> | ||
| {toolbar} | ||
| <CellOutput | ||
| cellVM={this.props.cellVM} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fully sure why the viewport - magic was being used, but it might have been to work around the grid blowout issues that I fixed, or some issue that doesn't apply any move, so I removed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's likely why I did it. I couldn't get the damn thing to use 100% of the width. It was probably the extra div messing it up.
In reply to: 383589621 [](ancestors = 383589621)