Skip to content

Commit 2c3dd61

Browse files
committed
📚💄 Fix rdoc 6.8 CSS styles
rdoc 6.8 fixed *many* things and broke two: * method headers * description lists
1 parent a31747a commit 2c3dd61

File tree

1 file changed

+70
-14
lines changed

1 file changed

+70
-14
lines changed

docs/styles.css

Lines changed: 70 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,80 @@
11
/* this is a work in progress. :) */
22

3-
main .method-header {
4-
background: rgba(27,31,35,0.05);
5-
border: 1px solid #6C8C22;
3+
/***********************************************
4+
* Method descriptions
5+
***********************************************/
6+
7+
main .method-detail {
8+
display: grid;
9+
grid-template-areas: "header controls"
10+
"description description";
11+
grid-template-columns: 1fr min-content;
12+
justify-content: space-between;
13+
}
14+
15+
main .method-header, main .method-controls {
616
padding: 0.5em;
7-
border-radius: 4px;
8-
/* padding: 0 0.5em; */
9-
/* border-width: 0 1px; */
10-
/* border-color: #6C8C22; */
11-
/* border-style: solid; */
17+
/* border: 1px solid var(--highlight-color); */
18+
background: var(--table-header-background-color);
19+
line-height: 1.6;
20+
}
21+
22+
main .method-header {
23+
grid-area: "header";
24+
border-right: none;
25+
border-radius: 4px 0 0 4px;
26+
}
27+
28+
main .method-controls {
29+
grid-area: "controls";
30+
border-left: none;
31+
border-radius: 0 4px 4px 0;
1232
}
1333

1434
main .method-description, main .aliases {
35+
grid-area: "description";
36+
grid-column: 1 / span 2;
1537
padding-left: 1em;
1638
}
1739

18-
body {
19-
/*
20-
* The default (300) can be too low contrast. Also, many fonts don't
21-
* distinguish between 300->400, so <em>...</em> had no effect.
22-
*/
23-
font-weight: 400;
40+
@media (max-width: 700px) {
41+
main .method-header, main .method-controls, main .method-description {
42+
grid-column: 1 / span 2;
43+
margin: 0;
44+
}
45+
main .method-controls {
46+
background: none;
47+
}
48+
}
49+
50+
/***********************************************
51+
* Description lists
52+
***********************************************/
53+
54+
main dt {
55+
margin-bottom: 0; /* override rdoc 6.8 */
56+
float: unset; /* override rdoc 6.8 */
57+
line-height: 1.5; /* matches `main p` */
58+
}
59+
60+
main dl.note-list dt {
61+
margin-right: 1em;
62+
float: left;
63+
}
64+
65+
main dl.note-list dt:has(+ dt) {
66+
margin-right: 0.25em;
67+
}
68+
69+
main dl.note-list dt:has(+ dt)::after {
70+
content: ', ';
71+
font-weight: normal;
72+
}
73+
74+
main dd {
75+
margin: 0 0 1em 1em;
76+
}
77+
78+
main dd p:first-child {
79+
margin-top: 0;
2480
}

0 commit comments

Comments
 (0)