aboutsummaryrefslogtreecommitdiff
path: root/index.css
blob: 5e0956637c9df2ca3abc6acfae085b21c85bad29 (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
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
* {
	margin: 0;
	padding: 0;
	text-align: center;
	--info-width: 13em;
	--fadetime: .3s;
	--box-bg: #222;
	--box-shadow: black;
}

/*** bg etc... ***/
body {
	background: #444;
	color: white;
	padding: 1em;

	font-family: verdana, sans-serif;
}

.shadow {
	text-shadow: .124em .125em black;
}

/*** dual layout ***/
#foodshift, #food {
	width: 100%;
	box-sizing: border-box;
	display: inline-block;
	vertical-align: top;
}

/*** responsivity ***/
@media screen and (min-width: 700px)
{
	#foodshift
	{
		width: 58%;
	}
	#food {
		width: 41%;
	}
}

/*** the ui blocks ***/
.float-block {
	display: inline-block;
	margin: 1em;
	padding: 1em;

	background: var(--box-bg);
	border: 0 solid black;
	border-radius: 5px;
}

.float-block p, .float-block h1, .float-block h2, .float-block label, .float-block select, .float-block input {
	margin: .5em;
}

/*** the send-button ***/
#send {
	background: blue;
	padding: .5em;
	margin: .5em;
	font-weight: bold;

	position: relative;
	right: .125em;
	bottom: .125em;
}

#send:hover {
	right: .25em;
	bottom: .25em;
	box-shadow: .25em .25em;
}

/*** The shadowed elements ***/
.highlight {
	border: 1px solid black;
	border-radius: 5px;
	box-shadow: .125em .125em var(--box-shadow);
}

/*** the info buttons & their animations ***/
img.info {
	width: 1em;
	height: 1em;
	vertical-align: middle;
}

img.info ~ span {
	position: relative;
	vertical-align: middle;
	left: -1em;
	animation: hide-at-start calc(var(--fadetime) * 1.1); /* this hides the flash of the child element in the start */
}
@keyframes hide-at-start {
	0% { bottom: 200vh; }
	99%{ bottom: 200vh; }
	100%{ bottom: 0; }
}

p.infoblock {
	display: inline;
	position: absolute;
	top: 1.5em;
	left: calc(var(--info-width) * -1 - 1em);
	width: var(--info-width);
	z-index: 1;

	background-color: var(--box-bg);
	--box-shadow: #111;
	margin: 0;
	padding: .5em;
	border-radius: 5px 0 5px 5px;

	animation-name: fade-out;
	animation-duration: var(--fadetime);
	visibility: hidden;
	opacity: 0;
}

img.info:hover ~ span > p.infoblock {
	animation-name: fade-in;
	animation-duration: var(--fadetime);
	visibility: visible;
	opacity: 1;
}

@keyframes fade-in {
	0% {
		visibility: hidden;
		opacity: 0;
	}
	100% {
		opacity: 1;
		visibility: visible;
	}
}

@keyframes fade-out {
	0% {
		opacity: 1;
		visibility: visible;
	}
	100% {
		opacity: 0;
		visibility: hidden;
	}
}