-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
261 lines (230 loc) · 5.48 KB
/
style.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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/* CSS Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-size: 100%;
line-height: 1.5;
}
body {
font-family: 'Lato', sans-serif;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
padding: 20px;
}
/* Main container styles */
#container {
background-color: #ffffff;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
width: 600px;
max-width: 100%;
text-align: center;
}
/* Heading styles */
h1 {
font-size: 24px;
margin-bottom: 20px;
color: #333;
}
/* Task input container styles */
.task-input {
display: flex;
flex-direction: column;
background-color: #f7f7f7;
padding: 15px;
border-radius: 10px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
/* Input field styles */
input[type="text"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 16px;
}
/* Container for category select and add button using Grid */
.input-controls {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 10px;
align-items: center;
}
/* Select field styles */
select {
width: 100%;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 16px;
color: #888;
background-color: #fff;
background-image: linear-gradient(45deg, transparent 50%, #333 50%), linear-gradient(135deg, #333 50%, transparent 50%);
background-position: calc(100% - 15px) center, calc(100% - 10px) center;
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
appearance: none;
}
/* Button styles */
button {
padding: 10px;
border: none;
border-radius: 5px;
background-color: #5a67d8;
color: white;
font-size: 16px;
cursor: pointer;
white-space: nowrap;
width: 100%;
}
/* Button hover effect */
button:hover {
background-color: #4c51bf;
}
/* Task list container styles */
#task-list {
max-height: 500px;
overflow-y: auto;
padding: 15px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
/* Task item styles */
#task-list li {
display: grid;
grid-template-columns: 2fr auto auto auto auto; /* Desktop version layout */
align-items: center;
padding: 10px;
border-bottom: 1px solid #ddd;
gap: 5px;
}
/* Styles for task text */
#task-list li span {
font-size: 16px;
text-align: left;
color: #4c51bf;
}
/* Styles for task category */
#task-list li .category {
font-style: italic;
color: #666;
margin-left: 0;
}
/* Styles for task buttons */
#task-list li .complete-button,
#task-list li .edit-button,
#task-list li .delete-button {
display: inline-block;
font-size: 14px;
padding: 5px 10px;
border-radius: 5px;
margin: 5px;
width: auto; /* Auto width for desktop view */
text-align: center;
}
/* Complete button */
#task-list li .complete-button {
background-color: #2ecc71;
}
#task-list li .complete-button:hover {
background-color: #27ae60;
}
/* Edit button */
#task-list li .edit-button {
background-color: #3498db;
}
#task-list li .edit-button:hover {
background-color: #2980b9;
}
/* Delete button */
#task-list li .delete-button {
background-color: #e74c3c;
}
#task-list li .delete-button:hover {
background-color: #c0392b;
}
/* Flexbox container for sorting and deleting */
.sort-delete-container {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 10px;
align-items: center;
margin: 10px 0;
padding: 5px 17px;
background-color: #f9f9f9;
border-radius: 5px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
/* Sorting task styles */
.sort-tasks {
display: flex;
align-items: center;
}
.sort-tasks label {
margin-right: 5px;
font-size: 14px;
}
.sort-tasks select {
padding: 5px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 14px;
}
/* Delete Completed button styles */
#delete-completed {
padding: 5px 10px;
border: none;
border-radius: 5px;
background-color: #e74c3c;
color: white;
cursor: pointer;
font-size: 14px;
}
#delete-completed:hover {
background-color: #c0392b;
}
/* Media Query for Tablets and Mobile Devices */
@media (max-width: 768px) {
#task-list li {
display: grid;
grid-template-columns: 1fr; /* Single column layout for mobile view */
grid-template-rows: auto auto auto; /* Three rows: task, category, buttons */
grid-template-areas:
"task"
"category"
"buttons"; /* Define areas */
padding: 10px;
gap: 10px; /* Space between task, category, and buttons */
}
/* Task text area */
#task-list li span {
grid-area: task; /* Place task text in the task area */
}
/* Category area */
#task-list li .category {
grid-area: category; /* Place category in the category area */
margin-top: 5px; /* Add top margin for separation */
}
/* Buttons area */
#task-list li .complete-button,
#task-list li .edit-button,
#task-list li .delete-button {
grid-area: buttons; /* Place buttons in the buttons area */
display: block; /* Block for full-width buttons */
width: 100%; /* Ensure all buttons take full width */
margin: 5px 0; /* Margin for spacing */
}
}