-
Notifications
You must be signed in to change notification settings - Fork 4
/
fix-docsrs-li-details-summary.html
80 lines (76 loc) · 2.7 KB
/
fix-docsrs-li-details-summary.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<style>
@import url('https://fonts.cdnfonts.com/css/apercu');
@import url('https://fonts.cdnfonts.com/css/fira-code-2');
details.custom > summary {
display: list-item;
/* https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b */
cursor: default;
}
.summary-box {
display: inline-block;
}
details.custom > summary > .summary-box > span {
visibility: hidden;
position: relative;
}
details.custom > summary > .summary-box > span:after {
content: "Click to show";
visibility: visible;
position: absolute;
top: 0;
left: 0;
}
details[open].custom > summary > .summary-box > span:after {
content: "Click to hide";
visibility: visible;
position: absolute;
top: 0;
left: 0;
}
/**
* Button style from https://github.com/ubuwaits/css3-buttons
* MIT-Licensed under the name of Chad Mazzola
* rev: c5d2eccd18c0be21c291982e40da0c590f8bc32f
*
* I made a few changes, the original is then commented out just above each.
**/
.summary-box {
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
background-image: linear-gradient(top, #eeeeee, #cccccc);
border: 1px solid #ccc;
border-bottom: 1px solid #bbb;
border-radius: 3px;
color: #333;
/* font: bold 11px/1 "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; */
font: bold 11px/1 "Fira Code", "Apercu Mono", "Courier New", sans-serif;
/* padding: 8px 0; */
padding-top: 2px;
text-align: center;
text-shadow: 0 1px 0 #eee;
/* width: 150px; */
}
.summary-box:hover {
background-color: #dddddd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dddddd), color-stop(100%, #bbbbbb));
background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
background-image: linear-gradient(top, #dddddd, #bbbbbb);
border: 1px solid #bbb;
border-bottom: 1px solid #999;
/* cursor: pointer; */
text-shadow: 0 1px 0 #ddd;
}
.summary-box:active {
border: 1px solid #aaa;
border-bottom: 1px solid #888;
-webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
}
</style>