Skip to content
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

Attempt removing use of flexbox in the notebook DOM #11508

Merged
merged 1 commit into from Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 12 additions & 9 deletions packages/cells/style/inputarea.css
Expand Up @@ -9,18 +9,19 @@

/* All input areas */
.jp-InputArea {
display: flex;
flex-direction: row;
display: table;
overflow: hidden;
}

body[data-format='mobile'] .jp-InputArea {
flex-direction: column;
}

.jp-InputArea-editor {
flex: 1 1 auto;
display: table-cell;
width: 100%;
overflow: hidden;
vertical-align: top;
}

body[data-format='mobile'] .jp-InputArea-editor {
display: table-row;
}

.jp-InputArea-editor {
Expand All @@ -35,7 +36,9 @@ body[data-format='mobile'] .jp-InputArea-editor {
}

.jp-InputPrompt {
flex: 0 0 var(--jp-cell-prompt-width);
display: table-cell;
vertical-align: top;
min-width: var(--jp-cell-prompt-width);
color: var(--jp-cell-inprompt-font-color);
font-family: var(--jp-cell-prompt-font-family);
padding: var(--jp-code-padding);
Expand All @@ -58,6 +61,6 @@ body[data-format='mobile'] .jp-InputArea-editor {
}

body[data-format='mobile'] .jp-InputPrompt {
flex: 0 0 auto;
display: table-row;
text-align: left;
}
11 changes: 5 additions & 6 deletions packages/cells/style/widget.css
Expand Up @@ -76,11 +76,9 @@
}

.jp-CodeCell.jp-mod-outputsScrolled .jp-OutputArea-prompt {
flex: 0 0
calc(
var(--jp-cell-prompt-width) -
var(--jp-private-cell-scrolling-output-offset)
);
min-width: calc(
var(--jp-cell-prompt-width) - var(--jp-private-cell-scrolling-output-offset)
);
}

/*-----------------------------------------------------------------------------
Expand All @@ -92,7 +90,8 @@
|----------------------------------------------------------------------------*/

.jp-MarkdownOutput {
flex: 1 1 auto;
display: table-cell;
width: 100%;
margin-top: 0;
margin-bottom: 0;
padding-left: var(--jp-code-padding);
Expand Down
1 change: 0 additions & 1 deletion packages/notebook/style/base.css
Expand Up @@ -62,7 +62,6 @@

.jp-Notebook .jp-Cell .jp-InputPrompt {
cursor: move;
float: left;
}

/*-----------------------------------------------------------------------------
Expand Down
25 changes: 11 additions & 14 deletions packages/outputarea/style/base.css
Expand Up @@ -20,16 +20,15 @@
}

.jp-OutputArea-child {
display: flex;
flex-direction: row;
}

body[data-format='mobile'] .jp-OutputArea-child {
flex-direction: column;
display: table;
width: 100%;
overflow: hidden;
}

.jp-OutputPrompt {
flex: 0 0 var(--jp-cell-prompt-width);
display: table-cell;
vertical-align: top;
min-width: var(--jp-cell-prompt-width);
color: var(--jp-cell-outprompt-font-color);
font-family: var(--jp-cell-prompt-font-family);
padding: var(--jp-code-padding);
Expand All @@ -51,11 +50,13 @@ body[data-format='mobile'] .jp-OutputArea-child {
}

body[data-format='mobile'] .jp-OutputPrompt {
flex: 0 0 auto;
display: table-row;
text-align: left;
}

.jp-OutputArea-output {
display: table-cell;
width: 100%;
height: auto;
overflow: auto;
user-select: text;
Expand All @@ -64,12 +65,8 @@ body[data-format='mobile'] .jp-OutputPrompt {
-ms-user-select: text;
}

.jp-OutputArea-child .jp-OutputArea-output {
flex-grow: 1;
flex-shrink: 1;
}

body[data-format='mobile'] .jp-OutputArea-child .jp-OutputArea-output {
display: table-row;
margin-left: var(--jp-notebook-padding);
}

Expand Down Expand Up @@ -166,7 +163,7 @@ body.lm-mod-override-cursor .jp-OutputArea-output.jp-mod-isolated:before {

.jp-OutputArea-output.jp-OutputArea-executeResult {
margin-left: 0px;
flex: 1 1 auto;
width: 100%;
}

/* Text output with the Out[] prompt needs a top padding to match the
Expand Down