Skip to content

Commit 85c1899

Browse files
feat: add css class to body for use with ipypopout
This allows for special styling in the case when a widget it shown in a popout window. The classname is jupyter-widgets-popout-container so that it is not ipypopout specific.
1 parent dab9ef1 commit 85c1899

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

solara/server/templates/solara.html.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@
211211
}
212212
// Init theme
213213
let appContainer = document.getElementById('app');
214+
const searchParams = new URLSearchParams(window.location.search);
215+
if(searchParams.has('modelid')) {
216+
// indicates that we are not mounting the application, but a specific
217+
// widget (for instance using ipypopout)
218+
document.body.classList.add('jupyter-widgets-popout-container');
219+
}
214220
if (inDarkMode()) {
215221
appContainer.classList.remove('theme--light');
216222
appContainer.classList.add('theme--dark');

0 commit comments

Comments
 (0)