/
Wasya106
/
ToDo_List_Basic_version
Обзор
Документация
Войти
/
Wasya106
/
ToDo_List_Basic_version
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
style.css
274 строки
5 KB
Yelisey
Refined UI design and fixed JS interactions
26 апр 2026, 06:59
26 апр 2026, 06:59
8cf8259
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg-color: #EBEBEB; --card-bg: #D0D8DF; --text-primary: #013547; --text-muted: #6C6F6E; --accent: #DDBA9B; --danger: #013547; --border: #6C6F6E; --radius: 12px; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: var(--bg-color); color: var(--text-primary); line-height: 1.6; display: flex; justify-content: center; padding: 40px 20px; } .todo-container { width: 100%; max-width: 480px; background-color: var(--card-bg); padding: 32px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(1, 53, 71, 0.1); } h1 { font-size: 24px; font-weight: 800; margin-bottom: 24px; letter-spacing: -1px; color: var(--text-primary); text-transform: uppercase; } /* Input section */ .input-section { display: flex; gap: 12px; margin-bottom: 32px; } #new-task-input { flex-grow: 1; padding: 12px 16px; font-size: 16px; font-weight: 500; border: 2px solid var(--border); background-color: var(--bg-color); color: var(--text-primary); border-radius: 8px; outline: none; transition: all 0.2s; } #new-task-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(221, 186, 155, 0.3); } #add-task-button { padding: 12px 20px; background-color: var(--text-primary); color: var(--bg-color); border: none; border-radius: 8px; cursor: pointer; font-weight: 700; transition: all 0.2s; } #add-task-button:hover { background-color: var(--accent); color: var(--text-primary); } /* Task list */ #task-list { list-style: none; margin-bottom: 32px; } #task-list li { padding: 16px 0; border-bottom: 1px solid rgba(108, 111, 110, 0.2); display: flex; align-items: center; gap: 12px; animation: fadeIn 0.3s ease-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } } #task-list li:last-child { border-bottom: none; } .task-text { flex-grow: 1; font-size: 16px; font-weight: 600; color: var(--text-primary); transition: color 0.2s; cursor: pointer; padding: 4px 8px; border-radius: 4px; } /* Визуальный акцент для активных задач */ li:not(.completed) .task-text { border-left: 3px solid var(--accent); padding-left: 10px; } .task-text:hover { background-color: rgba(221, 186, 155, 0.2); } .edit-input { flex-grow: 1; padding: 4px 8px; font-size: 16px; background-color: var(--bg-color); color: var(--text-primary); border: 2px solid var(--accent); border-radius: 4px; outline: none; font-family: inherit; } li.completed .task-text { color: var(--text-muted); text-decoration: line-through; border-left: 3px solid transparent; } /* Кастомные чекбоксы */ input[type="checkbox"] { appearance: none; width: 22px; height: 22px; border: 2px solid var(--text-primary); border-radius: 6px; background-color: var(--bg-color); cursor: pointer; display: grid; place-content: center; transition: all 0.2s; } input[type="checkbox"]::before { content: ""; width: 12px; height: 12px; transform: scale(0); transition: 0.12s transform ease-in-out; box-shadow: inset 1em 1em var(--text-primary); background-color: CanvasText; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); } input[type="checkbox"]:checked { background-color: var(--accent); border-color: var(--accent); } input[type="checkbox"]:checked::before { transform: scale(1); } .delete-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 8px; border-radius: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; opacity: 0.6; transition: all 0.2s; } .delete-btn:hover { color: var(--text-primary); background-color: rgba(1, 53, 71, 0.05); } /* Footer & Filters */ .footer-section { padding-top: 24px; border-top: 2px solid var(--text-primary); display: flex; flex-direction: column; gap: 16px; } .footer-actions { display: flex; justify-content: space-between; align-items: center; } #tasks-counter { font-size: 14px; font-weight: 700; color: var(--text-primary); } .text-btn { background: none; border: none; font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; text-decoration: underline; text-transform: uppercase; text-underline-offset: 3px; } .text-btn:hover { color: var(--text-primary); } .filters { display: flex; gap: 8px; } .empty-message { text-align: center; color: var(--text-muted); padding: 20px 0; font-style: italic; font-weight: 500; } .filter-btn { background: var(--bg-color); border: 2px solid var(--border); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--text-muted); transition: all 0.2s; } .filter-btn:hover { border-color: var(--text-primary); color: var(--text-primary); } .filter-btn.active { background-color: var(--text-primary); color: var(--bg-color); border-color: var(--text-primary); }