124 lines
2.6 KiB
CSS
124 lines
2.6 KiB
CSS
/*
|
|
* This is a manifest file that'll be compiled into application.css.
|
|
*
|
|
* With Propshaft, assets are served efficiently without preprocessing steps. You can still include
|
|
* application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
|
|
* cascading order, meaning styles declared later in the document or manifest will override earlier ones,
|
|
* depending on specificity.
|
|
*
|
|
* Consider organizing styles into separate files for maintainability.
|
|
*/
|
|
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
background: #f5f5f5;
|
|
color: #333;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.container {
|
|
max-width: 640px;
|
|
margin: 40px auto;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
margin-bottom: 24px;
|
|
color: #111;
|
|
}
|
|
|
|
.todo-form { margin-bottom: 16px; }
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.todo-input {
|
|
flex: 1;
|
|
padding: 10px 14px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 1rem;
|
|
outline: none;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.todo-input:focus { border-color: #4f46e5; }
|
|
|
|
.btn {
|
|
padding: 10px 18px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 0.9rem;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.btn:hover { opacity: 0.85; }
|
|
.btn-primary { background: #4f46e5; color: #fff; }
|
|
.btn-secondary { background: #e5e7eb; color: #374151; }
|
|
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
|
|
.btn-danger { background: #ef4444; color: #fff; }
|
|
|
|
.todo-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.todo-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: #fff;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
padding: 12px 16px;
|
|
margin-bottom: 8px;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.todo-item.completed { opacity: 0.55; }
|
|
.todo-item.completed .todo-title { text-decoration: line-through; color: #9ca3af; }
|
|
|
|
.toggle-btn { background: none; border: none; padding: 0; cursor: pointer; }
|
|
.toggle-btn form { margin: 0; }
|
|
|
|
.checkbox {
|
|
width: 22px;
|
|
height: 22px;
|
|
border: 2px solid #4f46e5;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.75rem;
|
|
color: #4f46e5;
|
|
font-weight: bold;
|
|
background: #fff;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.todo-item.completed .checkbox { background: #4f46e5; color: #fff; }
|
|
.todo-title { flex: 1; font-size: 1rem; }
|
|
.todo-actions { display: flex; gap: 6px; }
|
|
|
|
.error-messages {
|
|
background: #fef2f2;
|
|
border: 1px solid #fecaca;
|
|
border-radius: 6px;
|
|
padding: 10px 14px;
|
|
margin-bottom: 12px;
|
|
color: #b91c1c;
|
|
font-size: 0.9rem;
|
|
}
|