aboutsummaryrefslogtreecommitdiff
path: root/static/index.css
blob: fd8d87b6be28761af374e28346dd2d433839b9a1 (plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
:root {
    --heading: #FFBA80;
    --heading-mobile: #FF9A80;
    --heading-hover: #FFD0A0;
    --radius: 5px;
    --radius-mobile: 2px;
    --pre-background: rgba(0, 0, 0, .15);
}

input[type='checkbox'] {
    display: none;
}

@viewport {
  width: device-width ;
  zoom: 1.0 ;
} 

.lbl-toggle {
    display: block;
    background: var(--heading);
    cursor: pointer;
    border-radius: var(--radius);
    /* resemble h2 */
    font-weight: bold;
    font-size: x-large;
}

.lbl-toggle:hover {
    background-color: var(--heading-hover);
}

/* add the triangle */
.lbl-toggle::before {
  content: ' ';
  display: inline-block;

  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid currentColor;

  vertical-align: middle;
  margin-right: .7rem;
  transform: translateY(-2px);

  transition: transform .2s ease-out;
}

.content .content-inner {
  background: rgba(200, 180, 128, .2);
  border-bottom: 1px solid var(--heading);

  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  padding: .5rem 1rem;
}

.content {
  max-height: 0px;
  overflow: hidden;

  transition: max-height .25s ease-in-out;
}

.toggle:checked + .lbl-toggle + .content {
  max-height: 100vh;
}
.toggle:checked + .lbl-toggle::before {
  transform: rotate(90deg) translateX(-3px);
}

.toggle:checked + .lbl-toggle {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.content pre {
  background: var(--pre-background);
  border: 1px solid;
}

/* For narrow screens (probably mobile devices)
 * which works because html includes meta viewport.
 */
@media screen and (max-width: 500px) {

  .lbl-toggle {
    background: var(--heading-mobile);
    border-radius: var(--radius-mobile);
    font-weight: normal;
  }
  .content pre {
    /* wrap long text and urls */
    white-space: pre; /* CSS 2.0 */
    white-space: pre-wrap; /* CSS 2.1 */
    white-space: pre-line; /* CSS 3.0 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    white-space: -moz-pre-wrap; /* Mozilla */
    word-wrap: break-word; /* IE 5+ */
  }

}
/* vim: set ts=2 sw=2 sts=2 et: */
bgstack15