-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
220 lines (199 loc) · 5.8 KB
/
index.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
body {
/* to avoid horizontal overflow */
overflow-x: hidden;
/* CSS variables */
--smooth-edge-radius: 15px;
--main-font-size : 25px;
--margin-thickness: 10px;
--half-margin-thickness: calc(var(--margin-thickness) / 2) ;
--padding-thickness: 15px;
--minimized-card-height: 70px;
--card-titlebar-height: calc(var(--minimized-card-height) - calc(2*var(--margin-thickness)));
/* square buttons */
--card-btn-height: var(--card-titlebar-height);
--card-btn-width : var(--card-btn-height);
}
* {
/* CSS reset */
padding: 0px;
border: none;
margin: 0px;
}
.control-btn {
/* vertically above all the other elements */
z-index: 1;
box-shadow: 5px 5px 5px 0 grey;
/* buttons are fixed to the bottom of the browser */
position: fixed;
bottom: 50px;
font-size: var(--main-font-size);
/* 1.5 times it's font-size */
height: 2em;
width: 2em;
/* circular button */
border-radius: 50%;
}
.control-btn:hover {
cursor: pointer;
/* animating color change effect */
transition: background-color .1s; /* for microsoft IE */
-o-transition: background-color .1s; /* for opera */
-moz-transition: background-color .1s; /* for Mozilla Firefox */
-webkit-transition: background-color .1s; /* for Google-Chrome and Safari */
}
#addNewMenteeButton {
right: 50px;
background-color: steelblue;
}
#addNewMenteeButton:hover {
background-color: springgreen;
}
#deleteAllButton {
left: 50px;
background-color: orange;
}
#deleteAllButton:hover {
background-color: red;
}
#sortButton {
/* browser center align */
right: calc(50% - calc(2em / 2));
background-color: darkseagreen;
}
#sortButton:hover {
background-color: darkturquoise;
}
/* for screen width less than 1200px */
@media only screen and (max-width: 1200px) {
.mentee-card {
width: calc(100% - calc(2*var(--margin-thickness)));
}
}
/* for screen width greater than 1200px and less than 1800px*/
@media only screen and (min-width: 1200px) {
.mentee-card {
width: calc(50% - calc(2*var(--margin-thickness)));
}
}
/* for screen width greater than 1800px */
@media only screen and (min-width: 1800px) {
.mentee-card {
width: calc(33.33% - calc(2*var(--margin-thickness)));
}
}
.mentee-card {
position: relative;
display: inline-block;
/* initial card height */
max-height: var(--minimized-card-height);
/* vertical margins add up */
margin: var(--half-margin-thickness) var(--margin-thickness) var(--half-margin-thickness) var(--margin-thickness);
border-radius: var(--smooth-edge-radius);
float: left;
overflow: hidden;
background-color: lightgrey;
/* for animating the maximizing and minimizing effect */
transition: max-height .75s;
-o-transition: max-height .75s;
-moz-transition: max-height .75s;
-webkit-transition: max-height .75s;
box-shadow: 3px 3px 3px 0 grey;
}
.mentee-card:hover {
box-shadow: 8px 8px 8px 0 grey;
/* animation of shadow */
transition: box-shadow .3s;
-o-transition: box-shadow .3s;
-moz-transition: box-shadow .3s;
-webkit-transition: box-shadow .3s;
/* 'height' is not and animatable porperty, but 'max-height' can be animated. */
/* when the max height changes (during maximizing the card), the height of the card will change because of the text area */
/* initially when the max-height is set to 70px the <textarea> is not rendered on screen but is still present */
transition: max-height .75s;
-o-transition: max-height .75s;
-moz-transition: max-height .75s;
-webkit-transition: max-height .75s;
}
.pin-card-btn {
position: absolute;
left: var(--half-margin-thickness);
top: var(--half-margin-thickness);
height: calc(var(--card-btn-height) / 2);
width: calc(var(--card-btn-width) / 2);
font-size: calc(var(--main-font-size) / 2);
background-color: gray;
border-radius: 50%;
}
.card-titlebar {
display: inline-block;
height: var(--card-titlebar-height);
width: calc(100% - calc(3*var(--card-btn-width) + 5*var(--margin-thickness)));
/* has a margin on all 4 sides */
margin: var(--margin-thickness) var(--margin-thickness) var(--margin-thickness) var(--margin-thickness);
border-radius: var(--smooth-edge-radius);
/* to horizontally center align the name */
text-align: center;
/* to vertically center align the name */
line-height: var(--card-titlebar-height);
overflow: hidden;
font-size: var(--main-font-size);
background-color: darkgrey;
}
.card-titlebar:hover {
cursor: default;
}
.card-btn {
margin: var(--margin-thickness) var(--margin-thickness) var(--margin-thickness) 0px;
font-size:var(--main-font-size);
height: var(--card-btn-height);
width: var(--card-btn-width);
border-radius: var(--smooth-edge-radius);
}
.card-btn:hover {
cursor: pointer;
transition: color .1s;
-o-transition: color .1s;
-moz-transition: color .1s;
-webkit-transition: color .1s;
}
.delete-card-discard-changes-btn {
position: absolute;
right: 0px;
background-color: darkgrey;
}
.delete-card-discard-changes-btn:hover {
color: red;
}
.edit-card-save-changes-btn {
position: absolute;
right: calc(var(--card-btn-width) + var(--margin-thickness));
background-color: darkgrey;
}
.edit-card-save-changes-btn:hover {
color: green;
}
.maximize-minimize-card-btn {
position: absolute;
right: calc(2*var(--card-btn-width) + 2*var(--margin-thickness));
background-color: darkgrey;
}
.maximize-minimize-card-btn:hover {
color: steelblue;
}
.editable-content {
text-align: center;
font-size: 40px;
}
.card-textarea {
resize: none;
height: calc(250px - 2*var(--padding-thickness));
width: calc(100% - calc(2*var(--margin-thickness) + 2*var(--padding-thickness)));
padding: var(--padding-thickness) var(--padding-thickness) var(--padding-thickness) var(--padding-thickness);
margin: 0px var(--margin-thickness) var(--margin-thickness) var(--margin-thickness);
border-radius: calc(var(--smooth-edge-radius) / 2);
background-color: darkgrey;
font-size: calc(2*var(--main-font-size)/3);
}
.rating-star {
margin: none;
}