-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
flashcard.css
156 lines (128 loc) · 2.76 KB
/
flashcard.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
body {
margin: 0px;
padding: 0px;
overflow-wrap: break-word;
/* default background setting to fit with toolbar */
background-size: cover;
background-repeat: no-repeat;
background-position: top;
background-attachment: fixed;
}
li {
text-align: start;
}
pre {
text-align: left;
}
.nightMode .latex {
filter: invert(100%);
}
video {
max-width: 100%;
}
body.night_mode {
color: white;
background-color: black;
}
body.ankidroid_dark_mode {
background-color: #303030;
}
#content {
margin: 0.5em;
}
/* For the typed/correct answer comparison. The typePrompt and typeOff
classes are AnkiDroid specific, and used only for older (before
4.0) Android versions . typePrompt is a placeholder where the input
box should be. typeOff is added when the user switched off entering
the answer. */
.typeGood {
background-color: #0f0;
}
.typeBad {
background-color: #f00;
}
.typeMissed {
background-color: #ccc;
}
@font-face {
font-family: "Free Mono";
src: url("file:///android_asset/fonts/freefont/FreeMono.ttf")
}
#typeans {
width: 100%;
/* https://anki.tenderapp.com/discussions/beta-testing/1854-using-margin-auto-causes-horizontal-scrollbar-on-typesomething */
box-sizing: border-box;
/* #15535 - Not in libAnki - Android's Droid Sans Mono is insufficient for IPA */
font-family: "Free Mono";
}
code#typeans {
white-space: pre-wrap;
font-variant-ligatures: none;
}
.typePrompt {
color: magenta;
}
.typePrompt.typeOff {
display: none;
}
.night_mode input#typeans {
color: white;
background-color: black;
}
.night_mode .typeGood {
background-color: #508040;
}
.night_mode .typeBad {
background-color: #905050;
}
.ankidroid_dark_mode input#typeans {
background-color: #303030;
}
.replay-button {
text-decoration: none;
}
/*
Use hard-coded max dimensions if using Chrome back-end. Chrome is able to
zoom into images correctly even with max dimensions specified, so this way is
preferred over using JavaScript.
*/
.chrome img {
max-width: 100%;
max-height: 90%;
}
.vertically_centered {
position: absolute;
width: 100%;
height: 100%;
display: -webkit-box;
-webkit-box-align: stretch;
-webkit-box-pack: center;
-webkit-box-orient: vertical;
}
/* Make sure the replay buttons look black or white unless explicitly
changed. Use some fancy CSS to make the button align vertically, and
scale up, but not down. */
.replay-button span {
display: inline-block;
vertical-align: middle;
padding: 5px;
}
.replay-button span svg {
stroke: none;
fill: black;
display: inline;
height: 1em;
width: 1em;
min-width: 32px;
min-height: 32px;
}
.replay-button span img {
display: inline;
height: 1em;
width: 1em;
min-width: 32px;
min-height: 32px;
}
.night_mode .replay-button svg {
fill: white;
}