aboutsummaryrefslogtreecommitdiff
path: root/anki-card-template/card.css
blob: ed68b6fe09b07fe21fae2f090f58e670dbc0c716 (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
body {
	margin: 0;
	width: 100vw;
	height: 100vh;
}

body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.mobile #card .foreign { font-size: 1.75rem; }
.mobile #card .native { font-size: 1.25rem; }

#card .foreign { font-size: 1.5rem; }
#card .native { font-size: 1.0rem; }

#card { text-align: center; }
#card > * > span { display: block; }

#separator {
	border: none;
	opacity: 20%;
	margin: 0;
}
#separator { background-color: black; }
.nightMode #separator { background-color: white; }

#card.horizontal-layout #separator { height: 10px; }
#card.vertical-layout #separator { width: 10px; }

#card.front #target-word-reading,
#card.front #target-word-translation,
#card.front #sentence-translation,
#card.front hr,
#card.front ruby rt.hidden {
	display: none;
}

#card #back #sentence-translation { margin-top: 2em; }

.spoiler {
	transition: filter 300ms;
	cursor: pointer;
}
.spoiler.hidden { filter: blur(0.3rem); }
.spoiler.visible { filter: blur(0rem); }

#card.horizontal-layout { width: 100vw; }
#card.vertical-layout { height: 100vh; }
#card.vertical-layout > * { grid-row: 1; }
#card.vertical-layout {
	display: grid;
	grid-auto-columns: 1fr auto auto;
}
#card.vertical-layout #back { flex-direction: column; }
#card.vertical-layout #back,
#card.vertical-layout #front {
	display: flex;
	justify-content: center;
}

#card.vertical-layout #back { grid-column: 1; }
#card.vertical-layout #separator { grid-column: 2; }
#card.vertical-layout #front { grid-column: 3; }

#card.horizontal-layout > * > span,
#card.vertical-layout > #back > span {
	padding: 0 1em;
	margin: 0.5em auto;
}

#card.vertical-layout #sentence {
	padding: 1em 0;
	margin: auto 0.5em;
}

#card.vertical-layout #sentence { writing-mode: vertical-rl; }

#card.vertical-layout #sentence { max-height: 30em; }
#card.horizontal-layout span,
#card.vertical-layout #back span {
	max-width: 30em;
	margin-left: auto;
	margin-right: auto;
}

#card.vertical-layout #target-word-reading .reading { display: block; }