Skip to content

Commit a0eefbb

Browse files
kwagyemanclaude
andcommitted
css: make the inline video figure a full-width block
sphinxcontrib-video wraps <video> in an align-left (floated) figure and emits <video width="100%">, which browsers ignore on <video> (unlike <img>) -- so the video shrank to its intrinsic 680px and the following paragraph wrapped beside the float, one char per line. Force the video figure to a non-floated full-width block and size the <video> via CSS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent dcc8e7e commit a0eefbb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docs/static/custom.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,26 @@ video.framed,
11201120
overflow: hidden;
11211121
}
11221122

1123+
/* sphinxcontrib-video wraps the <video> in a figure that defaults to
1124+
"align-left" (floated), and emits <video width="100%"> -- which browsers
1125+
honour on <img> but NOT on <video>, so the video falls back to its intrinsic
1126+
size and the following text wraps beside the float. Force the video figure to
1127+
a full-width, non-floated block so text flows below it. */
1128+
.sphinx-contrib-video-container.align-left,
1129+
.sphinx-contrib-video-container {
1130+
float: none;
1131+
display: block;
1132+
width: 100%;
1133+
margin: 1.5rem 0;
1134+
}
1135+
.sphinx-contrib-video-container video,
1136+
video.framed {
1137+
display: block;
1138+
width: 100%;
1139+
height: auto;
1140+
margin: 0;
1141+
}
1142+
11231143
/* Sidebar: the theme absolutely-positions the expand/collapse chevron
11241144
at the right edge of each entry, so long titles run underneath it.
11251145
Reserve a thin column for the chevron on rows that have one. */

0 commit comments

Comments
 (0)