From 4578a7564ed57ba955cccfb9e51749ed7fe62f6c Mon Sep 17 00:00:00 2001 From: Nicolas Brichet Date: Tue, 14 Jan 2025 10:10:53 +0100 Subject: [PATCH 1/2] Fix CSS rule for Notebook application --- js/jupyterlab-slideshow/style/notebook.css | 7 ++++++- js/jupyterlab-slideshow/style/shell.css | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/js/jupyterlab-slideshow/style/notebook.css b/js/jupyterlab-slideshow/style/notebook.css index cd07efe..2b1c0c1 100644 --- a/js/jupyterlab-slideshow/style/notebook.css +++ b/js/jupyterlab-slideshow/style/notebook.css @@ -57,13 +57,18 @@ background: transparent; } -.jp-Deck .jp-Notebook.jp-WindowedPanel-outer, +.jp-Deck .jp-Notebook .jp-WindowedPanel-outer, .jp-Deck .jp-Notebook .jp-WindowedPanel-inner, body[data-notebook='notebooks'] .jp-Deck .jp-WindowedPanel-window, body[data-notebook='notebooks'] .jp-Deck .jp-Notebook-cell { background: transparent; } +/* Remove shadow around notebook widget for Notebook application */ +body[data-jp-deck-mode='presenting'] .jp-Deck .jp-Notebook .jp-WindowedPanel-viewport { + box-shadow: unset; +} + body[data-notebook='notebooks'] .jp-Deck .jp-Notebook.jp-mod-commandMode diff --git a/js/jupyterlab-slideshow/style/shell.css b/js/jupyterlab-slideshow/style/shell.css index 611751e..66fe464 100644 --- a/js/jupyterlab-slideshow/style/shell.css +++ b/js/jupyterlab-slideshow/style/shell.css @@ -1,7 +1,7 @@ body[data-jp-deck-mode='presenting'], -body[data-jp-deck-mode='presenting'] .jp-ThemedContainer:has(.jp-Deck), -body[data-jp-deck-mode='presenting'][data-notebook='notebooks'] .jp-WindowedPanel-outer { - background: var(--jp-layout-color0); +body[data-jp-deck-mode='presenting'] .jp-ThemedContainer:has(.jp-Deck) { + /* 'important' is required for Notebook application which add again this rule */ + background: var(--jp-layout-color0) !important; } body[data-jp-deck-mode='presenting'] #jp-main-content-panel { From 0f71508ef7e799b440e862b4cab99b6f54eee890 Mon Sep 17 00:00:00 2001 From: Nicolas Brichet Date: Tue, 14 Jan 2025 10:26:51 +0100 Subject: [PATCH 2/2] Fix scrollbar on slides for Jupyterlab>4.1 --- js/jupyterlab-slideshow/style/notebook.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jupyterlab-slideshow/style/notebook.css b/js/jupyterlab-slideshow/style/notebook.css index 2b1c0c1..2b4e62f 100644 --- a/js/jupyterlab-slideshow/style/notebook.css +++ b/js/jupyterlab-slideshow/style/notebook.css @@ -76,7 +76,10 @@ body[data-notebook='notebooks'] background: transparent !important; } -.jp-Deck .jp-Notebook.jp-mod-scrollPastEnd::after { +/* Both are required for compatibility with Jupyterlab before and after 4.1.0, after +https://github.com/jupyterlab/jupyterlab/commit/6a86d8f163fe11cf7b1964b1ed54999ee2234c8c#diff-ccf3f53605be6603fd5fd949742f25ea8919c48dcc75322c483ebf9988404 */ +.jp-Deck .jp-Notebook.jp-mod-scrollPastEnd::after, +.jp-Deck .jp-Notebook.jp-mod-scrollPastEnd > .jp-WindowedPanel-outer::after { display: none; }