From ee58872e98c58200dc71de557f7baef81da250a2 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 22 Oct 2024 18:19:04 +0000 Subject: [PATCH] fixes --- packages/notebook-extension/src/index.ts | 2 +- packages/notebook-extension/style/base.css | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index f0f645b58f..67f6af72b3 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -238,7 +238,7 @@ const fullWidthNotebook: JupyterFrontEndPlugin = { if (!current) { return; } - const content = current.content; + const content = current; content.toggleClass(FULL_WIDTH_NOTEBOOK_CLASS, fullWidth); }; diff --git a/packages/notebook-extension/style/base.css b/packages/notebook-extension/style/base.css index 3daecebac3..e34a06bee0 100644 --- a/packages/notebook-extension/style/base.css +++ b/packages/notebook-extension/style/base.css @@ -16,23 +16,23 @@ - compact view on mobile */ -/* Keep the notebook centered on the page */ - -body[data-notebook='notebooks'] .jp-NotebookPanel-toolbar { - padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5); - padding-right: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5); -} - /* Make the notebook take up the full width of the page when jp-mod-fullwidth is set */ + body[data-notebook='notebooks'] - .jp-Notebook.jp-mod-fullwidth + .jp-NotebookPanel.jp-mod-fullwidth .jp-WindowedPanel-outer { padding-left: unset; padding-right: unset !important; width: unset; } -/* Default notebook layout with a max-width */ +/* Keep the notebook centered on the page */ + +body[data-notebook='notebooks'] .jp-NotebookPanel-toolbar { + padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5); + padding-right: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5); +} + body[data-notebook='notebooks'] .jp-WindowedPanel-outer { width: unset !important; padding-top: unset;