Skip to content

Commit 377d866

Browse files
authored
Merge pull request #10535 from AA-Turner/css-nav-contents
Fix `nav.contents` CSS for Docutils 0.18
2 parents 7096024 + 27f0532 commit 377d866

File tree

11 files changed

+64
-13
lines changed

11 files changed

+64
-13
lines changed

doc/_themes/sphinx13/static/sphinx13.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ div.quotebar {
372372
margin-left: 1em;
373373
}
374374

375+
nav.contents,
375376
div.topic,
376377
aside.topic {
377378
background-color: #f8f8f8;

sphinx/themes/basic/static/basic.css_t

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,21 @@ p.sidebar-title {
337337
font-weight: bold;
338338
}
339339

340-
div.admonition, div.topic, aside.topic, blockquote {
340+
{%- if docutils_version_info[:2] >= (0, 18) %}
341+
nav.contents,
342+
aside.topic,
343+
{% endif %}
344+
div.admonition, div.topic, blockquote {
341345
clear: left;
342346
}
343347

344348
/* -- topics ---------------------------------------------------------------- */
345349

346-
div.topic, aside.topic {
350+
{%- if docutils_version_info[:2] >= (0, 18) %}
351+
nav.contents,
352+
aside.topic,
353+
{% endif %}
354+
div.topic {
347355
border: 1px solid #ccc;
348356
padding: 7px;
349357
margin: 10px 0 10px 0;
@@ -381,16 +389,22 @@ div.body p.centered {
381389

382390
div.sidebar > :last-child,
383391
aside.sidebar > :last-child,
384-
div.topic > :last-child,
392+
{%- if docutils_version_info[:2] >= (0, 18) %}
393+
nav.contents > :last-child,
385394
aside.topic > :last-child,
395+
{% endif %}
396+
div.topic > :last-child,
386397
div.admonition > :last-child {
387398
margin-bottom: 0;
388399
}
389400

390401
div.sidebar::after,
391402
aside.sidebar::after,
392-
div.topic::after,
403+
{%- if docutils_version_info[:2] >= (0, 18) %}
404+
nav.contents::after,
393405
aside.topic::after,
406+
{% endif %}
407+
div.topic::after,
394408
div.admonition::after,
395409
blockquote::after {
396410
display: block;

sphinx/themes/bizstyle/static/bizstyle.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ div.quotebar {
306306
border: 1px solid #ccc;
307307
}
308308

309-
div.topic, aside.topic {
309+
{%- if docutils_version_info[:2] >= (0, 18) %}
310+
nav.contents,
311+
aside.topic,
312+
{% endif %}
313+
div.topic {
310314
background-color: #f8f8f8;
311315
}
312316

sphinx/themes/classic/static/classic.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,11 @@ div.seealso {
290290
border: 1px solid #ff6;
291291
}
292292

293-
div.topic, aside.topic {
293+
{%- if docutils_version_info[:2] >= (0, 18) %}
294+
nav.contents,
295+
aside.topic,
296+
{% endif %}
297+
div.topic {
294298
background-color: #eee;
295299
}
296300

sphinx/themes/epub/static/epub.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ p.sidebar-title {
245245

246246
/* -- topics ---------------------------------------------------------------- */
247247

248-
div.topic, aside.topic {
248+
{%- if docutils_version_info[:2] >= (0, 18) %}
249+
nav.contents,
250+
aside.topic,
251+
{% endif %}
252+
div.topic {
249253
border: 1px solid #ccc;
250254
padding: 7px 7px 0 7px;
251255
margin: 10px 0 10px 0;

sphinx/themes/nature/static/nature.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ div.seealso {
194194
border: 1px solid #ff6;
195195
}
196196

197-
div.topic, aside.topic {
197+
{%- if docutils_version_info[:2] >= (0, 18) %}
198+
nav.contents,
199+
aside.topic,
200+
{% endif %}
201+
div.topic {
198202
background-color: #eee;
199203
}
200204

sphinx/themes/nonav/static/nonav.css renamed to sphinx/themes/nonav/static/nonav.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ p.sidebar-title {
234234

235235
/* -- topics ---------------------------------------------------------------- */
236236

237-
div.topic, aside.topic {
237+
{%- if docutils_version_info[:2] >= (0, 18) %}
238+
nav.contents,
239+
aside.topic,
240+
{% endif %}
241+
div.topic {
238242
border: 1px solid #ccc;
239243
padding: 7px 7px 0 7px;
240244
margin: 10px 0 10px 0;

sphinx/themes/pyramid/static/epub.css renamed to sphinx/themes/pyramid/static/epub.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ div.seealso {
254254
border: 1px solid #ff6;
255255
}
256256

257-
div.topic, aside.topic {
257+
{%- if docutils_version_info[:2] >= (0, 18) %}
258+
nav.contents,
259+
aside.topic,
260+
{% endif %}
261+
div.topic {
258262
background-color: #eee;
259263
}
260264

sphinx/themes/pyramid/static/pyramid.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ div.seealso {
245245
padding: 10px 20px 10px 60px;
246246
}
247247

248-
div.topic, aside.topic {
248+
{%- if docutils_version_info[:2] >= (0, 18) %}
249+
nav.contents,
250+
aside.topic,
251+
{% endif %}
252+
div.topic {
249253
background: #eeeeee;
250254
border: 2px solid #C6C9CB;
251255
padding: 10px 20px;

sphinx/themes/sphinxdoc/static/sphinxdoc.css_t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,11 @@ div.quotebar {
266266
border: 1px solid #ccc;
267267
}
268268

269-
div.topic, aside.topic {
269+
{%- if docutils_version_info[:2] >= (0, 18) %}
270+
nav.contents,
271+
aside.topic,
272+
{% endif %}
273+
div.topic {
270274
background-color: #f8f8f8;
271275
}
272276

0 commit comments

Comments
 (0)