Skip to content

Commit 15fe46b

Browse files
committed
Fix cell toolbar on mobile
1 parent 59f97b0 commit 15fe46b

File tree

1 file changed

+15
-4
lines changed
  • packages/notebook-extension/style

1 file changed

+15
-4
lines changed

packages/notebook-extension/style/base.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,29 @@ body[data-notebook='notebooks']
7272

7373
body[data-notebook='notebooks'] .jp-cell-toolbar {
7474
background: unset;
75-
top: unset;
7675
box-shadow: unset;
7776
}
7877

78+
body[data-notebook='notebooks']
79+
.jp-RawCell[data-windowed-list-index='0']
80+
.jp-cell-toolbar,
81+
body[data-notebook='notebooks']
82+
.jp-MarkdownCell[data-windowed-list-index='0']
83+
.jp-cell-toolbar {
84+
top: calc(2 * var(--jp-notebook-padding));
85+
}
86+
7987
@media only screen and (max-width: 760px) {
80-
body[data-notebook='notebooks'] .jp-CodeCell .jp-cell-toolbar {
81-
top: 20px;
88+
/* first code cell on mobile */
89+
body[data-notebook='notebooks']
90+
.jp-CodeCell[data-windowed-list-index='0']
91+
.jp-cell-toolbar {
92+
top: var(--jp-notebook-padding);
8293
}
8394

8495
body[data-notebook='notebooks'] .jp-MarkdownCell .jp-cell-toolbar,
8596
body[data-notebook='notebooks'] .jp-RawCell .jp-cell-toolbar {
86-
top: 5px;
97+
top: calc(0.5 * var(--jp-notebook-padding));
8798
}
8899
}
89100

0 commit comments

Comments
 (0)