Skip to content

Commit bf2eb25

Browse files
committed
Enlarged the container and ensured the Add button fits completely inside the same rounded container
1 parent 196ca03 commit bf2eb25

1 file changed

Lines changed: 150 additions & 41 deletions

File tree

Sprint-3/todo-list/style.css

Lines changed: 150 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,106 +2,215 @@
22
box-sizing: border-box;
33
margin: 0;
44
padding: 0;
5-
font-family: Arial, sans-serif;
5+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
66
}
77

88
body {
9-
background-color: #f4f4f4;
10-
padding: 40px;
9+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
10+
min-height: 100vh;
11+
padding: 40px 20px;
12+
display: flex;
13+
align-items: center;
14+
justify-content: center;
1115
}
1216

1317
.todo-container {
14-
max-width: 500px;
18+
max-width: 650px;
19+
width: 100%;
1520
margin: 0 auto;
16-
background: white;
17-
border-radius: 10px;
18-
padding: 20px;
19-
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
21+
background: rgba(255, 255, 255, 0.98);
22+
border-radius: 32px;
23+
padding: 36px 32px 44px;
24+
box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
25+
transition: transform 0.2s ease;
26+
}
27+
28+
.todo-container:hover {
29+
transform: scale(1.01);
2030
}
2131

2232
h1 {
2333
text-align: center;
24-
margin-bottom: 20px;
34+
font-size: 2.2rem;
35+
font-weight: 700;
36+
background: linear-gradient(120deg, #2d3748, #4a5568);
37+
background-clip: text;
38+
-webkit-background-clip: text;
39+
color: transparent;
40+
margin-bottom: 32px;
41+
letter-spacing: -0.5px;
2542
}
2643

44+
/* Input area – both field and button fully inside the rounded container */
2745
.todo-input {
2846
display: flex;
29-
gap: 10px;
30-
margin-bottom: 20px;
47+
gap: 14px;
48+
margin-bottom: 36px;
49+
background: #f8fafc;
50+
/* Extra right padding to give more space after the Add button */
51+
padding: 10px 18px 10px 10px;
52+
border-radius: 80px;
53+
box-shadow: inset 0 1px 3px rgba(0,0,0,0.02), 0 2px 6px rgba(0,0,0,0.05);
54+
min-height: 70px;
55+
align-items: center;
3156
}
3257

3358
.todo-input input {
3459
flex: 1;
35-
padding: 10px;
36-
font-size: 16px;
37-
border-radius: 6px;
38-
border: 1px solid #ccc;
60+
padding: 16px 22px;
61+
font-size: 1rem;
62+
border: none;
63+
background: white;
64+
border-radius: 60px;
65+
outline: none;
66+
transition: all 0.2s;
67+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
68+
font-weight: 500;
69+
color: #1a202c;
70+
}
71+
72+
.todo-input input:focus {
73+
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
74+
background: #ffffff;
3975
}
4076

4177
.todo-input button {
42-
padding: 10px 20px;
43-
font-size: 16px;
44-
background-color: #4CAF50;
78+
padding: 14px 32px;
79+
font-size: 1rem;
80+
font-weight: 600;
81+
background: linear-gradient(95deg, #4c6ef5, #3b4fcf);
4582
color: white;
4683
border: none;
47-
border-radius: 6px;
84+
border-radius: 60px;
4885
cursor: pointer;
86+
transition: all 0.2s ease;
87+
box-shadow: 0 8px 18px rgba(60, 80, 200, 0.3);
88+
letter-spacing: 0.5px;
89+
white-space: nowrap;
90+
display: inline-flex;
91+
align-items: center;
92+
gap: 8px;
93+
/* No margin-right needed; the parent's padding-right provides the space */
4994
}
5095

5196
.todo-input button:hover {
52-
background-color: #45a049;
97+
background: linear-gradient(95deg, #5f7cf5, #4a62e0);
98+
transform: translateY(-2px);
99+
box-shadow: 0 14px 24px -8px rgba(60, 80, 200, 0.5);
100+
}
101+
102+
.todo-input button:active {
103+
transform: translateY(1px);
104+
box-shadow: 0 6px 12px rgba(60, 80, 200, 0.25);
53105
}
54106

107+
/* Todo list styling */
55108
.todo-list {
56109
list-style-type: none;
57110
padding-left: 0;
111+
margin-top: 10px;
112+
display: flex;
113+
flex-direction: column;
114+
gap: 12px;
58115
}
59116

60117
.todo-item {
61118
display: flex;
62119
align-items: center;
63120
justify-content: space-between;
64-
padding: 12px 10px;
65-
margin-bottom: 10px;
66-
border: 1px solid #ddd;
67-
border-radius: 6px;
68-
background-color: #fff;
121+
padding: 14px 20px;
122+
background: #ffffff;
123+
border-radius: 80px;
124+
border: 1px solid #edf2f7;
125+
transition: all 0.2s;
126+
box-shadow: 0 1px 3px rgba(0,0,0,0.03);
127+
}
128+
129+
.todo-item:hover {
130+
background: #fafcff;
131+
border-color: #cbd5e1;
132+
box-shadow: 0 6px 14px -8px rgba(0,0,0,0.12);
69133
}
70134

71135
.description {
72136
flex: 1;
73-
margin-right: 10px;
74-
white-space: nowrap;
75-
overflow: hidden;
76-
text-overflow: ellipsis;
137+
margin-right: 16px;
138+
font-size: 1rem;
139+
font-weight: 500;
140+
color: #2d3e50;
141+
word-break: break-word;
142+
white-space: normal;
143+
line-height: 1.4;
144+
}
145+
146+
/* Completed tasks */
147+
.todo-item.completed .description {
148+
text-decoration: line-through;
149+
color: #94a3b8;
77150
}
78151

152+
/* Action buttons */
79153
.actions {
80154
display: flex;
81-
gap: 10px;
155+
gap: 12px;
82156
}
83157

84158
.actions button {
85159
background: none;
86160
border: none;
87161
cursor: pointer;
88-
font-size: 18px;
89-
display: flex;
162+
font-size: 1.2rem;
163+
width: 40px;
164+
height: 40px;
165+
border-radius: 40px;
166+
display: inline-flex;
90167
align-items: center;
91168
justify-content: center;
92-
width: 32px;
93-
height: 32px;
169+
transition: all 0.2s;
170+
background: #f1f5f9;
171+
color: #475569;
94172
}
95173

96-
.complete-btn i {
97-
color: green;
174+
.actions button:hover {
175+
transform: scale(1.05);
98176
}
99177

100-
.delete-btn i {
101-
color: red;
178+
.complete-btn:hover {
179+
background: #e0f2fe;
180+
color: #0f6b3a;
102181
}
103182

104-
.todo-item.completed .description {
105-
text-decoration: line-through;
106-
color: gray;
183+
.delete-btn:hover {
184+
background: #fee2e2;
185+
color: #c2410c;
186+
}
187+
188+
/* Responsive */
189+
@media (max-width: 550px) {
190+
.todo-container {
191+
padding: 24px 18px 32px;
192+
}
193+
.todo-input {
194+
flex-wrap: wrap;
195+
background: transparent;
196+
padding: 0;
197+
border-radius: 0;
198+
gap: 16px;
199+
min-height: auto;
200+
}
201+
.todo-input input,
202+
.todo-input button {
203+
width: 100%;
204+
border-radius: 60px;
205+
}
206+
.todo-item {
207+
flex-wrap: wrap;
208+
gap: 12px;
209+
border-radius: 32px;
210+
padding: 16px;
211+
}
212+
.actions {
213+
width: 100%;
214+
justify-content: flex-end;
215+
}
107216
}

0 commit comments

Comments
 (0)