Skip to content

Commit 9e92472

Browse files
committed
Avoid importing _ug-jsvectormap.min.css in non-experimental case
For the non-experimental deck, _ug-jsvectormap.min.css is clearly not present. This absence is harmless on Anki desktop, but results in an annoying pop-up message on AnkiDroid. Fix #700.
1 parent bdf6095 commit 9e92472

File tree

3 files changed

+107
-3
lines changed

3 files changed

+107
-3
lines changed

src/note_models/Ultimate_Geography_[Experimental].yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Ultimate Geography [Experimental]
22
id: 2e98b530-7583-5551-1fd7-51e6969d58ed
3-
css_file: src/note_models/style.css
3+
css_file: src/note_models/style_[Experimental].css
44
fields:
55
- name: Country
66
font: Arial

src/note_models/style.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import url("_ug-jsvectormap.min.css");
2-
31
.card {
42
padding: 1em 0;
53
background-color: white;
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
@import url("_ug-jsvectormap.min.css");
2+
3+
.card {
4+
padding: 1em 0;
5+
background-color: white;
6+
color: black;
7+
font-family: Verdana;
8+
font-size: 16px;
9+
text-align: center;
10+
}
11+
12+
.type {
13+
margin-bottom: 0.25em;
14+
color: #333;
15+
font-size: 70%;
16+
font-weight: bold;
17+
text-transform: uppercase;
18+
}
19+
20+
.info {
21+
max-width: 30em;
22+
margin: 0.75em auto;
23+
color: #333;
24+
font-size: 90%;
25+
font-style: italic;
26+
}
27+
28+
.value {
29+
font-size: 150%;
30+
}
31+
32+
.value--top {
33+
margin-top: 1em;
34+
}
35+
36+
.value--image {
37+
margin-top: 0.75em;
38+
}
39+
40+
.value--map {
41+
width: 90%;
42+
height: 65vh;
43+
margin: 2em auto 0 auto;
44+
}
45+
46+
.value > img,
47+
.value > .placeholder {
48+
max-width: 100%;
49+
height: auto;
50+
}
51+
52+
/**
53+
* Apply shadow to images, notably to bring out white areas on flags.
54+
* Ignore images with non-rectangular outlines (e.g. flag of Nepal).
55+
*/
56+
.value > img:not([src*="-nobox"]) {
57+
box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.2);
58+
}
59+
60+
/**
61+
* Some flags (e.g. Guam's) contain identifying words that can give away the answer.
62+
* If a blurred version is available, show it on the front but not on the back.
63+
*/
64+
.value--front > img[src*="-blur"] + img {
65+
display: none;
66+
}
67+
68+
.value--back > img[src*="-blur"] {
69+
display: none;
70+
}
71+
72+
/**
73+
* Placeholder SVG to hint at the type of answer that is expected.
74+
* Used on "Country - Flag" and "Country - Map" templates.
75+
*/
76+
.placeholder {
77+
color: #333;
78+
}
79+
80+
.placeholder > path {
81+
fill: none;
82+
stroke: currentColor;
83+
stroke-width: 1;
84+
}
85+
86+
.night_mode .info,
87+
.night_mode .type,
88+
.night_mode .placeholder,
89+
.nightMode .info,
90+
.nightMode .type,
91+
.nightMode .placeholder {
92+
color: #ccc;
93+
}
94+
95+
/**
96+
* Apply shadow to images, to bring out black areas on flags, in night
97+
mode.
98+
*/
99+
.nightMode .value > img:not([src*="-nobox"]),
100+
.night_mode .value > img:not([src*="-nobox"]) {
101+
box-shadow: 0 0 4px 1px rgba(54, 54, 54, 0.9);
102+
}
103+
104+
hr {
105+
margin: 1.5em 0;
106+
}

0 commit comments

Comments
 (0)