UNPKG

create-pact-toolbox-app

Version:
185 lines (153 loc) 2.75 kB
/* src/styles/TodoList.css */ .todo-list-container { max-width: 600px; margin: 50px auto; padding: 20px; background-color: #fdfdfd; /* Slightly lighter background */ border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .todo-list-container h1 { text-align: center; color: #333; margin-bottom: 20px; } .add-form { display: flex; margin-bottom: 20px; } .add-input { flex: 1; padding: 10px 12px; font-size: 16px; border: 1px solid #ccc; border-radius: 4px 0 0 4px; outline: none; } .add-input:focus { border-color: #4caf50; } .add-button { padding: 10px 16px; font-size: 16px; border: none; background-color: #4caf50; color: #fff; border-radius: 0 4px 4px 0; cursor: pointer; transition: background-color 0.3s; } .add-button:hover { background-color: #45a049; } .add-button:disabled { background-color: #a5d6a7; cursor: not-allowed; } .todo-list { list-style: none; padding: 0; margin: 0; } .todo-item { display: flex; align-items: center; justify-content: space-between; /* Distribute space between content and buttons */ padding: 12px 8px; border-bottom: 1px solid #eee; transition: background-color 0.3s; position: relative; } .todo-item:last-child { border-bottom: none; } .todo-item:hover { background-color: #f1f1f1; } .todo-item.completed .todo-title { text-decoration: line-through; color: #888; } .todo-content { display: flex; align-items: center; flex: 1; /* Allow content to take available space */ } .todo-checkbox { margin-right: 10px; width: 18px; height: 18px; } .todo-title { cursor: default; flex: 1; } .action-buttons { display: flex; gap: 8px; } .edit-button, .delete-button { padding: 6px 12px; font-size: 14px; border: none; border-radius: 4px; cursor: pointer; } .edit-button { background-color: #2196f3; color: #fff; } .delete-button { background-color: #f44336; color: #fff; } .edit-button:hover { background-color: #1976d2; } .delete-button:hover { background-color: #d32f2f; } .edit-form { display: flex; align-items: center; width: 100%; } .edit-input { flex: 1; padding: 6px 8px; font-size: 16px; border: 1px solid #ccc; border-radius: 4px; } .edit-input:focus { border-color: #4caf50; } .edit-buttons { display: flex; gap: 8px; margin-left: 8px; } .cancel-button, .save-button { padding: 6px 12px; font-size: 14px; border: none; border-radius: 4px; cursor: pointer; } .cancel-button { background-color: #f44336; color: #fff; } .save-button { background-color: #4caf50; color: #fff; } .cancel-button:hover { background-color: #d32f2f; } .save-button:hover { background-color: #388e3c; }