Skip to content

Commit f335f2a

Browse files
jeremymanningclaude
andcommitted
Stop a full-width checkbox putting a scrollbar inside the card
ipywidgets checkboxes carry their own padding and a minimum width, so `width="100%"` overflows the container and leaves a horizontal scrollbar under the row -- visible under "Allow paid GPU flavors" in the HuggingFace section. They size to their content now. Adds docs/evidence/widget/05-huggingface-jobs.jpg, showing the HuggingFace Jobs section that the widget gained in this branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gTBDPK16HUZ3kHQ2QyjuU
1 parent 66454da commit f335f2a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

clustrix/modern_notebook_widget.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ def _inject_css_styles(self) -> None:
175175
.clustrix-widget .widget-hbox,
176176
.clustrix-widget .widget-vbox { min-width: 0 !important; }
177177
.clustrix-row { max-width: 100%; overflow: hidden; }
178+
/* ipywidgets checkboxes carry their own padding and a min-width that
179+
together overflow a full-width container, leaving a scrollbar. */
180+
.clustrix-widget .widget-checkbox {
181+
width: auto !important;
182+
max-width: 100%;
183+
overflow: hidden;
184+
}
178185
.clustrix-section { margin-bottom: 16px !important; }
179186
.clustrix-section:last-child { margin-bottom: 0 !important; }
180187
@@ -965,7 +972,7 @@ def _create_remote_section(self) -> None:
965972
value=False,
966973
description="Allow paid GPU flavors",
967974
indent=False,
968-
layout=widgets.Layout(width="100%"),
975+
layout=widgets.Layout(width="auto", margin="4px 0 0 0"),
969976
)
970977

971978
hf_row = widgets.HBox(
54.2 KB
Loading

0 commit comments

Comments
 (0)