Skip to content

Commit 28014e3

Browse files
committed
Rework the parameter table style, fixes #868
1 parent 02063d3 commit 28014e3

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

pydoctor/themes/base/apidocs.css

+18-12
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ ul ul ul ul ul ul ul {
228228
.fieldTable {
229229
width: 100%;
230230
border: 0;
231+
overflow: hidden;
231232
}
232233

233234
/* Arg name */
@@ -248,15 +249,26 @@ ul ul ul ul ul ul ul {
248249

249250
.fieldTable tr td {
250251
padding: 2px;
252+
vertical-align: top;
251253
}
252254

255+
/* Add border to separate parameter rows */
256+
.fieldTable tr:not(:last-of-type):has(.fieldArgContainer):has(+ tr:not(.fieldStart)) {
257+
box-shadow: 25px 1px 0 #ddd;
258+
border-bottom: 7px solid;
259+
border-color: transparent;
260+
}
253261

254262
/* Argument name + type column table */
255263
.fieldTable tr td.fieldArgContainer {
256-
width: 325px;
264+
max-width: 400px;
257265
word-break: break-word;
258266
}
259267

268+
.fieldTable tr td.fieldArgDesc {
269+
max-width: 600px;
270+
}
271+
260272
/* parameters names in parameters table */
261273
.fieldTable tr td.fieldArgContainer > .fieldArg {
262274
float: left;
@@ -306,6 +318,11 @@ ul ul ul ul ul ul ul {
306318
width: auto;
307319
}
308320

321+
/* Argument name + type column table */
322+
.fieldTable tr td.fieldArgContainer {
323+
width: 33%;
324+
}
325+
309326
}
310327

311328
@media only screen and (max-width: 820px) {
@@ -320,24 +337,13 @@ ul ul ul ul ul ul ul {
320337
#splitTables > table tr td:nth-child(2) {
321338
width: 160px;
322339
}
323-
/* Argument name + type column table */
324-
.fieldTable tr td.fieldArgContainer {
325-
width: 170px;
326-
}
327-
.fieldTable {
328-
table-layout: fixed;
329-
}
330340
}
331341

332342
@media only screen and (max-width: 450px) {
333343
/* Attr name column table */
334344
#splitTables > table tr td:nth-child(2) {
335345
width: 100px;
336346
}
337-
/* Argument name + type column table */
338-
.fieldTable tr td.fieldArgContainer {
339-
width: 125px;
340-
}
341347
}
342348

343349
table .package {

pydoctor/themes/readthedocs/readthedocstheme.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,7 @@ input[type="search"] {
747747
border-left: 3px solid rgb(80, 80, 90);
748748
}
749749
#childList a:target ~ .functionBody{
750-
background-color: transparent;
751-
box-shadow: none;
750+
box-shadow: 7px 1px 0px 3px rgb(253 255 223), -36px 1px 0px 3px rgb(253 255 223);
752751
}
753752

754753
@font-face {

0 commit comments

Comments
 (0)