-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummarydetails.xml
More file actions
72 lines (63 loc) · 2.21 KB
/
Copy pathsummarydetails.xml
File metadata and controls
72 lines (63 loc) · 2.21 KB
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
/* the newest blogger blogspot templates, while responsive, seem to break the summary / details tags magic; I looked for a few fixes */
/* the simplest fix is in HTML and involves getting it started in the open state by adding open to details, as in <details open> */
/* the first, from https://css-tricks.com/quick-reminder-that-details-summary-is-the-easiest-way-ever-to-make-an-accordion/ will point a fixed arrow at it */
details {
margin: 1rem;
}
summary {
font-weight: bold;
list-style-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/right-arrow.svg);
}
summary::-webkit-details-marker {
background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/right-arrow.svg);
color: transparent;
}
/* the second, same source, will move the arrow, but the arrow returns if out of focus + won't go back */
details {
margin: 1rem;
}
summary {
font-weight: bold;
list-style-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/right-arrow.svg);
}
summary:focus {
list-style-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/down-arrow.svg);
}
summary::-webkit-details-marker {
background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/right-arrow.svg);
color: transparent;
}
summary:focus::-webkit-details-marker {
background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/down-arrow.svg);
}
/* switch cursor value to pointer on hover from https://css-tricks.com/two-issues-styling-the-details-element-and-how-to-solve-them/ */
details summary {
cursor: pointer;
}
/* make headings inline element to prevent empty space, source as above */
details summary > * {
display: inline;
}
/* the following creates a look similar to a tabbed interface, where clicking the tab opens it to reveal its contents from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details */
details {
font: 16px "Open Sans", Calibri, sans-serif;
width: 620px;
}
details > summary {
padding: 2px 6px;
width: 15em;
background-color: #ddd;
border: none;
box-shadow: 3px 3px 4px black;
cursor: pointer;
}
details > p {
border-radius: 0 0 10px 10px;
background-color: #ddd;
padding: 2px 6px;
margin: 0;
box-shadow: 3px 3px 4px black;
}
details[open] > summary {
background-color: #ccf;
}