forked from PreTeXtBook/CSS_core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
knowls_default.css
227 lines (208 loc) · 4.92 KB
/
knowls_default.css
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/*
main knowls style
*/
[data-knowl] {
display: inline;
position: relative;
cursor: pointer;
color: #9c2310;
padding: 0px 2px 0px 2px;
margin: 0;
text-decoration: none;
margin-bottom: 1px;
/*
margin-bottom: 0;
*/
font-weight: 500;
white-space: nowrap;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
user-select: none;
transition-property: background-color;
transition-duration: 0ms;
}
table [data-knowl] {
white-space: pre-line;
}
[data-knowl]:hover, [data-knowl]:active, [data-knowl].active {
color: #8a1200;
background: #ffedeb;
/*
margin-bottom: 0;
*/
border-bottom: none;
}
[data-knowl]::after, [data-knowl]:hover::after, [data-knowl].active::after {
content: "";
position: absolute;
top: 0;
bottom: 1px;
right: 2.4px;
left: 2.4px;
border-bottom: 1px dotted #9c2310;
transition-property: left, right;
transition-duration: 0ms;
z-index: 0;
}
/* is the next only for a proof or other content that is only a knowl? */
article > [data-knowl]::after, article > [data-knowl]:hover::after, article > [data-knowl].active::after {
content: "";
position: absolute;
top: 0;
bottom: 1px;
right: 8.4px;
right: 0.6em;
left: 2.4px;
border-bottom: 1px dotted #9c2310;
transition-property: left, right;
transition-duration: 0ms;
z-index: 0;
}
[data-knowl].fn-knowl {
padding-left: 0;
padding-right: 0;
margin-right: 2px;
}
[data-knowl].fn-knowl::after {
bottom: 7px;
}
.knowl-error {
color: red;
border-bottom: 0;
}
.knowl-output {
background: #f5f5ff;
border: 10px solid #ddf;
border-radius: 10px;
display: none;
padding: 0;
margin-top: 10px;
}
.knowl-output.original {
background: #f8f8f8;
border: none;
/* border-left: 1px solid #666;
*/
border-radius: 0;
display: none;
padding: 0;
margin-top: 10px;
}
.knowl-output.original .knowl-content {
padding-top: 0;
padding-bottom: 0;
margin-bottom: 0;
}
.knowl-output.original:after {
content: '';
/* border-bottom: 1px solid #666;
*/
display: block;
/*
margin-right: auto;
margin-left: -0.10em;
width: 1.5em;
*/
/* so the corner of the L meets */
padding-top: 0.35em;
}
.example-like .knowl-output.original {
background: inherit;
}
.knowl-output .knowl-output {
border-width: 6px;
background: #fffff5;
border-radius: 4px;
margin-bottom: -3px;
margin-left: -7px;
margin-right: -7px;
}
.knowl-output .knowl-output .knowl-output {
background: #fff5ff;
}
.knowl-output .knowl-output .knowl-output .knowl-output {
background: #fafffa;
}
.knowl-footer {
position: relative;
bottom: -9px;
font-size: x-small;
background: #ddf;
color: grey;
padding: 0 0 0 12px;
margin: -10px 0 0 0;
}
.knowl-footer a {
color: #006;
}
.knowl-footer a:hover {
background: none;
color: #88f;
}
/* .knowl-footer:after {
content: "\2002";
} */
.knowl-output .knowl-output .knowl-footer {
bottom: -5px;
margin: -5px 0 0 0;
}
.knowl-output + .knowl-output {
margin-top: 0;
}
.knowl-output + .knowl-output.original {
margin-top: 0.5em;
}
.knowl-content {
padding: 10px;
padding-bottom: 7px;
}
.knowl-content > *:first-child {
margin-top: 0;
}
/* sort of a hack for proof knows in theorem knowls */
.pretext-content div.knowl .posterior a[data-knowl]:first-child {
padding: 0;
}
/* not sure where this was being used, but it made short knowls
* look bad, like the hint here:
* SAFurtherReading.html
*/
.pretext-content .knowl-output .knowl-content > *:last-child:not(.incontext) {
margin-bottom: 0.5em;
}
/* No Greg's L in knowls, to save space */
.pretext-content .knowl-content > article.theorem-like,
.pretext-content .knowl-content > article.definition-like,
.pretext-content .knowl-content > article.example-like,
.pretext-content .knowl-content > article.project-like,
.pretext-content .knowl-content > article.objectives,
.pretext-content .knowl-content > article.outcomes,
.pretext-content .knowl-content > article.remark-like {
padding-left: 0;
border-left: none;
}
.pretext-content .knowl-content > article.theorem-like::after,
.pretext-content .knowl-content > article.definition-like::after,
.pretext-content .knowl-content > article.example-like::after,
.pretext-content .knowl-content > article.project-like::after,
.pretext-content .knowl-content > article.objectives::after,
.pretext-content .knowl-content > article.outcomes::after,
.pretext-content .knowl-content > article.remark-like::after {
content: '';
border-bottom: none;
margin: 0;
padding: 0;
width: 0;
}
/* sup knowls are used for footnotes */
/* the next 2 are obsolete, because (in PTX HTML) the structure is now a(sup), not sup(a) */
sup [data-knowl] {
padding: 0px 0px 0px 3px;
}
sup .active[data-knowl] {
padding: 0px 0px 0px 3px;
}
sup [data-knowl]:hover {
padding: 0px 0px 0px 3px;
}