-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
175 lines (158 loc) · 3.46 KB
/
style.css
File metadata and controls
175 lines (158 loc) · 3.46 KB
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
/* 1. THEME VARIABLES */
:root {
/* Dark Mode (Default) */
--bg-body: #121212;
--bg-app: #1e1e1e;
--text-main: #ffffff;
--text-dim: #a0a0a0;
--input-bg: #2a2a2a;
--accent: #00ff88;
--delete: #ff4444;
}
body.light-mode {
/* Light Mode Palette */
--bg-body: #f4f4f9;
--bg-app: #ffffff;
--text-main: #1e1e1e;
--text-dim: #666666;
--input-bg: #eeeeee;
--accent: #008f5d;
--delete: #cc0000;
}
/* 2. BASE STYLES */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', -apple-system, sans-serif;
}
body {
background: var(--bg-body);
color: var(--text-main);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
transition: background 0.3s ease, color 0.3s ease;
}
/* 3. APP CONTAINER */
.container {
width: 100%;
max-width: 450px;
padding: 20px;
position: relative;
}
.todo-app {
background: var(--bg-app);
padding: 40px 30px;
border-radius: 24px;
box-shadow: 0 15px 35px rgba(0,0,0,0.4);
transition: background 0.3s ease;
}
.todo-app h2 {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 25px;
}
/* 4. THEME TOGGLE BUTTON */
#theme-btn {
position: absolute;
top: -10px;
right: 20px;
background: var(--input-bg);
border: 1px solid var(--accent);
color: var(--text-main);
padding: 8px 12px;
border-radius: 12px;
cursor: pointer;
font-size: 1.2rem;
transition: all 0.2s;
}
#theme-btn:hover {
transform: scale(1.1);
}
/* 5. INPUT ROW */
.row {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--input-bg);
border-radius: 30px;
padding-left: 20px;
margin-bottom: 25px;
}
input {
flex: 1;
border: none;
outline: none;
background: transparent;
color: var(--text-main);
padding: 15px 0;
font-size: 16px;
}
button.add-btn {
border: none;
outline: none;
padding: 16px 35px;
background: var(--accent);
color: #000;
font-size: 16px;
font-weight: 700;
cursor: pointer;
border-radius: 30px;
}
/* 6. TASK LIST ITEMS */
ul li {
list-style: none;
font-size: 17px;
padding: 12px 45px 12px 40px;
user-select: none;
cursor: pointer;
position: relative;
border-bottom: 1px solid var(--input-bg);
}
/* Custom Checkbox Circle */
ul li::before {
content: '';
position: absolute;
height: 22px;
width: 22px;
border-radius: 50%;
border: 2px solid var(--accent);
left: 5px;
top: 50%;
transform: translateY(-50%);
transition: 0.2s;
}
/* Checked State */
ul li.checked {
color: var(--text-dim);
text-decoration: line-through;
}
ul li.checked::before {
background: var(--accent);
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');
background-size: 12px;
background-repeat: no-repeat;
background-position: center;
}
/* 7. DELETE BUTTON (SPAN) */
ul li span {
position: absolute;
right: 5px;
top: 50%;
transform: translateY(-50%);
width: 30px;
height: 30px;
font-size: 20px;
color: var(--delete);
line-height: 30px;
text-align: center;
border-radius: 50%;
transition: 0.2s;
}
ul li span:hover {
background: rgba(255, 68, 68, 0.1);
color: var(--delete);
}