Skip to content

Commit dda888a

Browse files
authored
Merge pull request #9077 from tk0miya/9051_figure_style
Fix #9051: html theme: The style for figure are not applied
2 parents 43dc091 + b7dedec commit dda888a

File tree

7 files changed

+44
-23
lines changed

7 files changed

+44
-23
lines changed

CHANGES

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ Bugs fixed
2020

2121
* #9078: autodoc: Async staticmethods and classmethods are considered as non
2222
async coroutine-functions with Python3.10
23-
* #8870: The style of toctree captions has been changed with docutils-0.17
24-
* #9001: The style of ``sidebar`` directive has been changed with docutils-0.17
23+
* #8870, #9001, #9051: html theme: The style are not applied with docutils-0.17
24+
25+
- toctree captions
26+
- The content of ``sidebar`` directive
27+
- figures
2528

2629
Testing
2730
--------

sphinx/themes/agogo/static/agogo.css_t

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,19 +370,25 @@ div.footer .left {
370370

371371
/* Styles copied from basic theme */
372372

373-
img.align-left, .figure.align-left, object.align-left {
373+
img.align-left, figure.align-left, .figure.align-left, object.align-left {
374374
clear: left;
375375
float: left;
376376
margin-right: 1em;
377377
}
378378

379-
img.align-right, .figure.align-right, object.align-right {
379+
img.align-right, figure.align-right, .figure.align-right, object.align-right {
380380
clear: right;
381381
float: right;
382382
margin-left: 1em;
383383
}
384384

385-
img.align-center, .figure.align-center, object.align-center {
385+
img.align-center, figure.align-center, .figure.align-center, object.align-center {
386+
display: block;
387+
margin-left: auto;
388+
margin-right: auto;
389+
}
390+
391+
img.align-default, figure.align-default, .figure.align-default {
386392
display: block;
387393
margin-left: auto;
388394
margin-right: auto;
@@ -407,11 +413,13 @@ table caption span.caption-number {
407413
table caption span.caption-text {
408414
}
409415

410-
div.figure p.caption span.caption-number {
416+
div.figure p.caption span.caption-number,
417+
figcaption span.caption-number {
411418
font-style: italic;
412419
}
413420

414-
div.figure p.caption span.caption-text {
421+
div.figure p.caption span.caption-text,
422+
figcaption span.caption-text {
415423
}
416424

417425
/* -- search page ----------------------------------------------------------- */

sphinx/themes/basic/static/basic.css_t

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,25 +277,25 @@ p.rubric {
277277
font-weight: bold;
278278
}
279279

280-
img.align-left, .figure.align-left, object.align-left {
280+
img.align-left, figure.align-left, .figure.align-left, object.align-left {
281281
clear: left;
282282
float: left;
283283
margin-right: 1em;
284284
}
285285

286-
img.align-right, .figure.align-right, object.align-right {
286+
img.align-right, figure.align-right, .figure.align-right, object.align-right {
287287
clear: right;
288288
float: right;
289289
margin-left: 1em;
290290
}
291291

292-
img.align-center, .figure.align-center, object.align-center {
292+
img.align-center, figure.align-center, .figure.align-center, object.align-center {
293293
display: block;
294294
margin-left: auto;
295295
margin-right: auto;
296296
}
297297

298-
img.align-default, .figure.align-default {
298+
img.align-default, figure.align-default, .figure.align-default {
299299
display: block;
300300
margin-left: auto;
301301
margin-right: auto;
@@ -458,20 +458,22 @@ td > :last-child {
458458

459459
/* -- figures --------------------------------------------------------------- */
460460

461-
div.figure {
461+
div.figure, figure {
462462
margin: 0.5em;
463463
padding: 0.5em;
464464
}
465465

466-
div.figure p.caption {
466+
div.figure p.caption, figcaption {
467467
padding: 0.3em;
468468
}
469469

470-
div.figure p.caption span.caption-number {
470+
div.figure p.caption span.caption-number,
471+
figcaption span.caption-number {
471472
font-style: italic;
472473
}
473474

474-
div.figure p.caption span.caption-text {
475+
div.figure p.caption span.caption-text,
476+
figcaption span.caption-text {
475477
}
476478

477479
/* -- field list styles ----------------------------------------------------- */

sphinx/themes/epub/static/epub.css_t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,13 @@ table.citation td {
325325

326326
/* -- figures --------------------------------------------------------------- */
327327

328-
div.figure p.caption span.caption-number {
328+
div.figure p.caption span.caption-number,
329+
figcaption span.caption-number {
329330
font-style: italic;
330331
}
331332

332-
div.figure p.caption span.caption-text {
333+
div.figure p.caption span.caption-text,
334+
figcaption span.caption-text {
333335
}
334336

335337
/* -- field list styles ----------------------------------------------------- */

sphinx/themes/nonav/static/nonav.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,13 @@ table.citation td {
314314

315315
/* -- figures --------------------------------------------------------------- */
316316

317-
div.figure p.caption span.caption-number {
317+
div.figure p.caption span.caption-number,
318+
figcaption span.caption-number {
318319
font-style: italic;
319320
}
320321

321-
div.figure p.caption span.caption-text {
322+
div.figure p.caption span.caption-text,
323+
figcaption span.caption-text {
322324
}
323325

324326
/* -- field list styles ----------------------------------------------------- */

sphinx/themes/scrolls/static/scrolls.css_t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,13 @@ div.viewcode-block:target {
478478
padding: 0 5px;
479479
}
480480

481-
div.figure p.caption span.caption-number {
481+
div.figure p.caption span.caption-number,
482+
figcaption span.caption-number {
482483
font-style: italic;
483484
}
484485

485-
div.figure p.caption span.caption-text {
486+
div.figure p.caption span.caption-text,
487+
figcaption span.caption-text {
486488
}
487489

488490
/* math display */

sphinx/themes/traditional/static/traditional.css_t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,11 +743,13 @@ div.literal-block-wrapper pre {
743743
margin: 0;
744744
}
745745

746-
div.figure p.caption span.caption-number {
746+
div.figure p.caption span.caption-number,
747+
figcaption span.caption-number {
747748
font-style: italic;
748749
}
749750

750-
div.figure p.caption span.caption-text {
751+
div.figure p.caption span.caption-text,
752+
figcaption span.caption-text {
751753
}
752754

753755
/* :::: MATH DISPLAY :::: */

0 commit comments

Comments
 (0)