| 1 | |
| 2 | html, body { |
| 3 | font-family: Arial, Helvetica, sans-serif; |
| 4 | font-size: 16px; |
| 5 | margin: 0; |
| 6 | } |
| 7 | |
| 8 | body { |
| 9 | max-width: 900px; |
| 10 | padding: 50px; |
| 11 | margin: auto; |
| 12 | } |
| 13 | |
| 14 | * { |
| 15 | box-sizing: border-box; |
| 16 | } |
| 17 | |
| 18 | /* simple styles reset */ |
| 19 | button { |
| 20 | appearance: none; |
| 21 | outline: 0; |
| 22 | border: 0; |
| 23 | margin: 0; |
| 24 | padding: 0; |
| 25 | } |
| 26 | |
| 27 | input { |
| 28 | appearance: none; |
| 29 | outline: 0; |
| 30 | font-size: 16px; |
| 31 | height: 30px; |
| 32 | line-height: 30px; |
| 33 | border: 1px solid #d3d3d3; |
| 34 | border-radius: 5px; |
| 35 | } |
| 36 | |
| 37 | button { |
| 38 | font-size: 14px; |
| 39 | height: 30px; |
| 40 | padding: 5px 20px; |
| 41 | border-radius: 5px; |
| 42 | cursor: pointer; |
| 43 | } |
| 44 | |
| 45 | button.primary { |
| 46 | background-color: #3b71ca; |
| 47 | color: white; |
| 48 | } |
| 49 | button.error { |
| 50 | background-color: red; |
| 51 | color: white; |
| 52 | } |
| 53 | button.success { |
| 54 | background-color: green; |
| 55 | color: white; |
| 56 | } |
| 57 | |
| 58 | .form-success { |
| 59 | color: green; |
| 60 | } |
| 61 | |
| 62 | .form-error { |
| 63 | color: red; |
| 64 | } |
| 65 | |
| 66 | h1 { |
| 67 | text-align: center; |
| 68 | } |
| 69 | |
| 70 | section { |
| 71 | padding: 20px; |
| 72 | } |
| 73 | section.create-todo { |
| 74 | max-width: fit-content; |
| 75 | margin: auto; |
| 76 | } |
| 77 | |
| 78 | .todo-list { |
| 79 | display: flex; |
| 80 | flex-direction: column; |
| 81 | } |
| 82 | |
| 83 | .todo { |
| 84 | display: flex; |
| 85 | align-items: center; |
| 86 | gap: 10px; |
| 87 | padding: 20px; |
| 88 | border-top: 1px solid #d3d3d3; |
| 89 | } |
| 90 | |
| 91 | .todo .name { |
| 92 | flex-grow: 1; |
| 93 | font-weight: bold; |
| 94 | } |
| 95 | |
| 96 | .todo-id, .time { |
| 97 | font-size: 14px; |
| 98 | font-weight: normal; |
| 99 | color: #3d3d3d; |
| 100 | margin: 0px 10px; |
| 101 | } |
| 102 | |
| 103 | /* we're mobile friendly */ |
| 104 | @media only screen and (max-width: 900px) { |
| 105 | body { |
| 106 | max-width: unset; |
| 107 | } |
| 108 | |
| 109 | .todo { |
| 110 | flex-direction: column; |
| 111 | gap: 5px; |
| 112 | } |
| 113 | .todo p { |
| 114 | margin: 0; |
| 115 | } |
| 116 | |
| 117 | section.create-todo form { |
| 118 | display: flex; |
| 119 | flex-direction: column; |
| 120 | gap: 10px; |
| 121 | } |
| 122 | } |