|
323 | 323 | // This makes me terribly unhappy and makes this code very nesty. Unfortunately I've seen hand-written docs |
324 | 324 | // that output similar, but not quite the same nesting so this is really the best we can do. |
325 | 325 | dl:not(.docutils) |
326 | | - margin-bottom: $base-line-height |
327 | | - // This would be the equivilant of a .. class:: |
328 | | - dt |
329 | | - display: table |
330 | | - margin: $base-line-height / 4 0 |
331 | | - font-size: 90% |
332 | | - line-height: normal |
333 | | - background: lighten($class-color, 50%) |
334 | | - color: $class-color |
335 | | - border-top: solid 3px lighten($class-color, 20%) |
336 | | - padding: $base-line-height / 4 |
337 | | - position: relative |
338 | | - &:before |
339 | | - color: lighten($class-color, 20%) |
340 | | - .headerlink |
341 | | - color: $text-color |
342 | | - font-size: 100% !important |
343 | | - // And this would be the .. method:: |
344 | | - dl dt |
345 | | - margin-bottom: $base-line-height / 4 |
346 | | - border: none |
347 | | - border-left: solid 3px hsl(0,0%,80%) |
348 | | - background: hsl(0,0%,94%) |
349 | | - color: $method-color |
350 | | - .headerlink |
351 | | - color: $headerlink-color |
352 | | - font-size: 100% !important |
353 | | - dt:first-child |
354 | | - margin-top: 0 |
355 | | - // Since dts get the callout style, we treat this less as callouts. |
356 | | - tt, code |
357 | | - font-weight: bold |
358 | | - &.descname, &.descclassname |
359 | | - background-color: transparent |
| 326 | + // In Sphinx 2.0+ most DLs no longer contain .docutils, needs tighter scoping using next line |
| 327 | + &.class, &.data |
| 328 | + margin-bottom: $base-line-height |
| 329 | + // This would be the equivilant of a .. class:: |
| 330 | + dt |
| 331 | + display: table |
| 332 | + margin: $base-line-height / 4 0 |
| 333 | + font-size: 90% |
| 334 | + line-height: normal |
| 335 | + background: lighten($class-color, 50%) |
| 336 | + color: $class-color |
| 337 | + border-top: solid 3px lighten($class-color, 20%) |
| 338 | + padding: $base-line-height / 4 |
| 339 | + position: relative |
| 340 | + &:before |
| 341 | + color: lighten($class-color, 20%) |
| 342 | + .headerlink |
| 343 | + color: $text-color |
| 344 | + font-size: 100% !important |
| 345 | + // And this would be the .. method:: |
| 346 | + dl dt |
| 347 | + margin-bottom: $base-line-height / 4 |
360 | 348 | border: none |
361 | | - padding: 0 |
362 | | - font-size: 100% !important |
363 | | - &.descname |
| 349 | + border-left: solid 3px hsl(0,0%,80%) |
| 350 | + background: hsl(0,0%,94%) |
| 351 | + color: $method-color |
| 352 | + .headerlink |
| 353 | + color: $headerlink-color |
| 354 | + font-size: 100% !important |
| 355 | + dt:first-child |
| 356 | + margin-top: 0 |
| 357 | + // Since dts get the callout style, we treat this less as callouts. |
| 358 | + tt, code |
364 | 359 | font-weight: bold |
365 | | - // This is for more advanced parameter control |
366 | | - .optional |
367 | | - display: inline-block |
368 | | - padding: 0 4px |
369 | | - color: $black |
370 | | - font-weight: bold |
371 | | - .property |
372 | | - display: inline-block |
373 | | - padding-right: 8px |
| 360 | + &.descname, &.descclassname |
| 361 | + background-color: transparent |
| 362 | + border: none |
| 363 | + padding: 0 |
| 364 | + font-size: 100% !important |
| 365 | + &.descname |
| 366 | + font-weight: bold |
| 367 | + // This is for more advanced parameter control |
| 368 | + .optional |
| 369 | + display: inline-block |
| 370 | + padding: 0 4px |
| 371 | + color: $black |
| 372 | + font-weight: bold |
| 373 | + .property |
| 374 | + display: inline-block |
| 375 | + padding-right: 8px |
374 | 376 | // Doc links to sourcecode |
375 | 377 | .viewcode-link, .viewcode-back |
376 | 378 | display: inline-block |
|
0 commit comments