Skip to content

Commit 189f086

Browse files
Touch up details CSS
* Keep member name aligned to the top left (i.e., don't shift around when details are expanded). * Put marker back before the summary. * Make the table readable on mobile by wrapping rows when too narrow.
1 parent 70d8dac commit 189f086

File tree

1 file changed

+25
-43
lines changed

1 file changed

+25
-43
lines changed

docs/content/fsdocs-default.css

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,29 +1013,32 @@ span[onmouseout] {
10131013
padding: var(--spacing-400) 0;
10141014
}
10151015

1016-
& tbody td {
1017-
border-top: 1px solid var(--header-border);
1018-
padding: var(--spacing-300) 0;
1019-
padding-right: var(--spacing-300);
1016+
& tr {
1017+
display: flex;
1018+
flex-flow: row wrap;
1019+
column-gap: 1rem;
10201020

1021-
&:first-child a {
1021+
& td:first-of-type {
1022+
flex: 25 0 0;
1023+
min-width: 20em;
10221024
overflow-x: hidden;
10231025
text-overflow: ellipsis;
1024-
width: 100%;
1025-
display: block;
1026+
overflow-wrap: break-word;
1027+
1028+
& p {
1029+
margin: unset;
1030+
}
10261031
}
10271032

1028-
&:last-child {
1029-
padding-right: 0;
1033+
& td:nth-of-type(2) {
1034+
flex: 75 0 0;
1035+
min-width: 15em;
10301036
}
10311037
}
10321038

1033-
& thead tr td:first-child, & td.fsdocs-entity-name, & td.fsdocs-member-usage {
1034-
width: 25%;
1035-
1036-
& p {
1037-
margin: 0;
1038-
}
1039+
& tbody td {
1040+
border-top: 1px solid var(--header-border);
1041+
padding: var(--spacing-300) 0;
10391042
}
10401043

10411044
.fsdocs-entity-xmldoc {
@@ -1061,7 +1064,11 @@ span[onmouseout] {
10611064

10621065
.fsdocs-member-xmldoc {
10631066
& summary {
1064-
list-style: none;
1067+
display: list-item;
1068+
counter-increment: list-item 0;
1069+
list-style: disclosure-closed outside;
1070+
cursor: pointer;
1071+
margin-left: 1rem;
10651072

10661073
> .fsdocs-summary {
10671074
display: flex;
@@ -1080,23 +1087,15 @@ span[onmouseout] {
10801087
overflow-x: auto;
10811088
}
10821089
}
1083-
1084-
&::after {
1085-
content: '▶';
1086-
cursor: pointer;
1087-
}
10881090
}
10891091

10901092
& details[open] summary {
1093+
list-style-type: disclosure-open;
10911094
margin-bottom: var(--spacing-200);
10921095
}
10931096

1094-
& details[open] summary::after {
1095-
content: "▼";
1096-
}
1097-
10981097
.fsdocs-returns, .fsdocs-params {
1099-
margin: var(--spacing-200) 0;
1098+
margin: var(--spacing-200);
11001099

11011100
&:first-child {
11021101
margin-top: 0;
@@ -1110,23 +1109,6 @@ span[onmouseout] {
11101109
.fsdocs-return-name, .fsdocs-param-name {
11111110
font-weight: 500;
11121111
}
1113-
1114-
/* hide the browser mark and display one after the summary */
1115-
1116-
& ::marker {
1117-
display: none;
1118-
}
1119-
1120-
> div.fsdocs-summary {
1121-
display: flex;
1122-
flex-direction: row-reverse;
1123-
justify-content: space-between;
1124-
align-items: center;
1125-
1126-
> p {
1127-
margin: 0;
1128-
}
1129-
}
11301112
}
11311113
}
11321114

0 commit comments

Comments
 (0)