10
0

index.css 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. html,
  2. body {
  3. margin: 0;
  4. padding: 0;
  5. }
  6. button {
  7. margin: 0;
  8. padding: 0;
  9. border: 0;
  10. background: none;
  11. font-size: 100%;
  12. vertical-align: baseline;
  13. font-family: inherit;
  14. font-weight: inherit;
  15. color: inherit;
  16. -webkit-appearance: none;
  17. appearance: none;
  18. -webkit-font-smoothing: antialiased;
  19. -moz-osx-font-smoothing: grayscale;
  20. }
  21. body {
  22. font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
  23. line-height: 1.4em;
  24. background: #f5f5f5;
  25. color: #4d4d4d;
  26. min-width: 230px;
  27. max-width: 550px;
  28. margin: 0 auto;
  29. -webkit-font-smoothing: antialiased;
  30. -moz-osx-font-smoothing: grayscale;
  31. font-weight: 300;
  32. }
  33. :focus {
  34. outline: 0;
  35. }
  36. .hidden {
  37. display: none;
  38. }
  39. .todoapp {
  40. background: #fff;
  41. margin: 130px 0 40px 0;
  42. position: relative;
  43. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);
  44. }
  45. .todoapp input::-webkit-input-placeholder {
  46. font-style: italic;
  47. font-weight: 300;
  48. color: #e6e6e6;
  49. }
  50. .todoapp input::-moz-placeholder {
  51. font-style: italic;
  52. font-weight: 300;
  53. color: #e6e6e6;
  54. }
  55. .todoapp input::input-placeholder {
  56. font-style: italic;
  57. font-weight: 300;
  58. color: #e6e6e6;
  59. }
  60. .todoapp h1 {
  61. position: absolute;
  62. top: -155px;
  63. width: 100%;
  64. font-size: 100px;
  65. font-weight: 100;
  66. text-align: center;
  67. color: rgba(175, 47, 47, 0.15);
  68. -webkit-text-rendering: optimizeLegibility;
  69. -moz-text-rendering: optimizeLegibility;
  70. text-rendering: optimizeLegibility;
  71. }
  72. .new-todo,
  73. .edit {
  74. position: relative;
  75. margin: 0;
  76. width: 100%;
  77. font-size: 24px;
  78. font-family: inherit;
  79. font-weight: inherit;
  80. line-height: 1.4em;
  81. border: 0;
  82. color: inherit;
  83. padding: 6px;
  84. border: 1px solid #999;
  85. box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
  86. box-sizing: border-box;
  87. -webkit-font-smoothing: antialiased;
  88. -moz-osx-font-smoothing: grayscale;
  89. }
  90. .new-todo {
  91. padding: 16px 16px 16px 60px;
  92. border: none;
  93. background: rgba(0, 0, 0, 0.003);
  94. box-shadow: inset 0 -2px 1px rgba(0, 0, 0, 0.03);
  95. }
  96. .main {
  97. position: relative;
  98. z-index: 2;
  99. border-top: 1px solid #e6e6e6;
  100. }
  101. .toggle-all {
  102. width: 1px;
  103. height: 1px;
  104. border: none; /* Mobile Safari */
  105. opacity: 0;
  106. position: absolute;
  107. right: 100%;
  108. bottom: 100%;
  109. }
  110. .toggle-all + label {
  111. width: 60px;
  112. height: 34px;
  113. font-size: 0;
  114. position: absolute;
  115. top: -52px;
  116. left: -13px;
  117. -webkit-transform: rotate(90deg);
  118. transform: rotate(90deg);
  119. }
  120. .toggle-all + label:before {
  121. content: '❯';
  122. font-size: 22px;
  123. color: #e6e6e6;
  124. padding: 10px 27px 10px 27px;
  125. }
  126. .toggle-all:checked + label:before {
  127. color: #737373;
  128. }
  129. .todo-list {
  130. margin: 0;
  131. padding: 0;
  132. list-style: none;
  133. }
  134. .todo-list li {
  135. position: relative;
  136. font-size: 24px;
  137. border-bottom: 1px solid #ededed;
  138. }
  139. .todo-list li:last-child {
  140. border-bottom: none;
  141. }
  142. .todo-list li.editing {
  143. border-bottom: none;
  144. padding: 0;
  145. }
  146. .todo-list li.editing .edit {
  147. display: block;
  148. width: calc(100% - 43px);
  149. padding: 12px 16px;
  150. margin: 0 0 0 43px;
  151. }
  152. .todo-list li.editing .view {
  153. display: none;
  154. }
  155. .todo-list li .toggle {
  156. text-align: center;
  157. width: 40px;
  158. /* auto, since non-WebKit browsers doesn't support input styling */
  159. height: auto;
  160. position: absolute;
  161. top: 0;
  162. bottom: 0;
  163. margin: auto 0;
  164. border: none; /* Mobile Safari */
  165. -webkit-appearance: none;
  166. appearance: none;
  167. }
  168. .todo-list li .toggle {
  169. opacity: 0;
  170. }
  171. .todo-list li .toggle + label {
  172. /*
  173. Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433
  174. IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/
  175. */
  176. background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E');
  177. background-repeat: no-repeat;
  178. background-position: center left;
  179. }
  180. .todo-list li .toggle:checked + label {
  181. background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E');
  182. }
  183. .todo-list li label {
  184. word-break: break-all;
  185. padding: 15px 15px 15px 60px;
  186. display: block;
  187. line-height: 1.2;
  188. transition: color 0.4s;
  189. }
  190. .todo-list li.completed label {
  191. color: #d9d9d9;
  192. text-decoration: line-through;
  193. }
  194. .todo-list li .destroy {
  195. display: none;
  196. position: absolute;
  197. top: 0;
  198. right: 10px;
  199. bottom: 0;
  200. width: 40px;
  201. height: 40px;
  202. margin: auto 0;
  203. font-size: 30px;
  204. color: #cc9a9a;
  205. margin-bottom: 11px;
  206. transition: color 0.2s ease-out;
  207. }
  208. .todo-list li .destroy:hover {
  209. color: #af5b5e;
  210. }
  211. .todo-list li .destroy:after {
  212. content: '×';
  213. }
  214. .todo-list li:hover .destroy {
  215. display: block;
  216. }
  217. .todo-list li .edit {
  218. display: none;
  219. }
  220. .todo-list li.editing:last-child {
  221. margin-bottom: -1px;
  222. }
  223. .footer {
  224. color: #777;
  225. padding: 10px 15px;
  226. height: 20px;
  227. text-align: center;
  228. border-top: 1px solid #e6e6e6;
  229. }
  230. .footer:before {
  231. content: '';
  232. position: absolute;
  233. right: 0;
  234. bottom: 0;
  235. left: 0;
  236. height: 50px;
  237. overflow: hidden;
  238. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 8px 0 -3px #f6f6f6,
  239. 0 9px 1px -3px rgba(0, 0, 0, 0.2), 0 16px 0 -6px #f6f6f6,
  240. 0 17px 2px -6px rgba(0, 0, 0, 0.2);
  241. }
  242. .todo-count {
  243. float: left;
  244. text-align: left;
  245. }
  246. .todo-count strong {
  247. font-weight: 300;
  248. }
  249. .filters {
  250. margin: 0;
  251. padding: 0;
  252. list-style: none;
  253. position: absolute;
  254. right: 0;
  255. left: 0;
  256. }
  257. .filters li {
  258. display: inline;
  259. }
  260. .filters li a {
  261. color: inherit;
  262. margin: 3px;
  263. padding: 3px 7px;
  264. text-decoration: none;
  265. border: 1px solid transparent;
  266. border-radius: 3px;
  267. }
  268. .filters li a:hover {
  269. border-color: rgba(175, 47, 47, 0.1);
  270. }
  271. .filters li a.selected {
  272. border-color: rgba(175, 47, 47, 0.2);
  273. }
  274. .clear-completed,
  275. html .clear-completed:active {
  276. float: right;
  277. position: relative;
  278. line-height: 20px;
  279. text-decoration: none;
  280. cursor: pointer;
  281. }
  282. .clear-completed:hover {
  283. text-decoration: underline;
  284. }
  285. .info {
  286. margin: 65px auto 0;
  287. color: #bfbfbf;
  288. font-size: 10px;
  289. text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  290. text-align: center;
  291. }
  292. .info p {
  293. line-height: 1;
  294. }
  295. .info a {
  296. color: inherit;
  297. text-decoration: none;
  298. font-weight: 400;
  299. }
  300. .info a:hover {
  301. text-decoration: underline;
  302. }
  303. /*
  304. Hack to remove background from Mobile Safari.
  305. Can't use it globally since it destroys checkboxes in Firefox
  306. */
  307. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  308. .toggle-all,
  309. .todo-list li .toggle {
  310. background: none;
  311. }
  312. .todo-list li .toggle {
  313. height: 40px;
  314. }
  315. }
  316. @media (max-width: 430px) {
  317. .footer {
  318. height: 50px;
  319. }
  320. .filters {
  321. bottom: 10px;
  322. }
  323. }