style.css 6.8 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),
  44. 0 25px 50px 0 rgba(0, 0, 0, 0.1);
  45. }
  46. .todoapp input::-webkit-input-placeholder {
  47. font-style: italic;
  48. font-weight: 300;
  49. color: #e6e6e6;
  50. }
  51. .todoapp input::-moz-placeholder {
  52. font-style: italic;
  53. font-weight: 300;
  54. color: #e6e6e6;
  55. }
  56. .todoapp input::input-placeholder {
  57. font-style: italic;
  58. font-weight: 300;
  59. color: #e6e6e6;
  60. }
  61. .todoapp h1 {
  62. position: absolute;
  63. top: -155px;
  64. width: 100%;
  65. font-size: 100px;
  66. font-weight: 100;
  67. text-align: center;
  68. color: rgba(175, 47, 47, 0.15);
  69. -webkit-text-rendering: optimizeLegibility;
  70. -moz-text-rendering: optimizeLegibility;
  71. text-rendering: optimizeLegibility;
  72. }
  73. .new-todo,
  74. .edit {
  75. position: relative;
  76. margin: 0;
  77. width: 100%;
  78. font-size: 24px;
  79. font-family: inherit;
  80. font-weight: inherit;
  81. line-height: 1.4em;
  82. border: 0;
  83. color: inherit;
  84. padding: 6px;
  85. border: 1px solid #999;
  86. box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
  87. box-sizing: border-box;
  88. -webkit-font-smoothing: antialiased;
  89. -moz-osx-font-smoothing: grayscale;
  90. }
  91. .new-todo {
  92. padding: 16px 16px 16px 60px;
  93. border: none;
  94. background: rgba(0, 0, 0, 0.003);
  95. box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03);
  96. }
  97. .main {
  98. position: relative;
  99. z-index: 2;
  100. border-top: 1px solid #e6e6e6;
  101. }
  102. .toggle-all {
  103. text-align: center;
  104. border: none; /* Mobile Safari */
  105. opacity: 0;
  106. position: absolute;
  107. }
  108. .toggle-all + label {
  109. width: 60px;
  110. height: 34px;
  111. font-size: 0;
  112. position: absolute;
  113. top: -52px;
  114. left: -13px;
  115. -webkit-transform: rotate(90deg);
  116. transform: rotate(90deg);
  117. }
  118. .toggle-all + label:before {
  119. content: '❯';
  120. font-size: 22px;
  121. color: #e6e6e6;
  122. padding: 10px 27px 10px 27px;
  123. }
  124. .toggle-all:checked + label:before {
  125. color: #737373;
  126. }
  127. .todo-list {
  128. margin: 0;
  129. padding: 0;
  130. list-style: none;
  131. }
  132. .todo-list li {
  133. position: relative;
  134. font-size: 24px;
  135. border-bottom: 1px solid #ededed;
  136. }
  137. .todo-list li:last-child {
  138. border-bottom: none;
  139. }
  140. .todo-list li.editing {
  141. border-bottom: none;
  142. padding: 0;
  143. }
  144. .todo-list li.editing .edit {
  145. display: block;
  146. width: 506px;
  147. padding: 12px 16px;
  148. margin: 0 0 0 43px;
  149. }
  150. .todo-list li.editing .view {
  151. display: none;
  152. }
  153. .todo-list li .toggle {
  154. text-align: center;
  155. width: 40px;
  156. /* auto, since non-WebKit browsers doesn't support input styling */
  157. height: auto;
  158. position: absolute;
  159. top: 0;
  160. bottom: 0;
  161. margin: auto 0;
  162. border: none; /* Mobile Safari */
  163. -webkit-appearance: none;
  164. appearance: none;
  165. }
  166. .todo-list li .toggle {
  167. opacity: 0;
  168. }
  169. .todo-list li .toggle + label {
  170. /*
  171. Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433
  172. 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/
  173. */
  174. 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');
  175. background-repeat: no-repeat;
  176. background-position: center left;
  177. }
  178. .todo-list li .toggle:checked + label {
  179. 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');
  180. }
  181. .todo-list li label {
  182. word-break: break-all;
  183. padding: 15px 15px 15px 60px;
  184. display: block;
  185. line-height: 1.2;
  186. transition: color 0.4s;
  187. }
  188. .todo-list li.completed label {
  189. color: #d9d9d9;
  190. text-decoration: line-through;
  191. }
  192. .todo-list li .destroy {
  193. display: none;
  194. position: absolute;
  195. top: 0;
  196. right: 10px;
  197. bottom: 0;
  198. width: 40px;
  199. height: 40px;
  200. margin: auto 0;
  201. font-size: 30px;
  202. color: #cc9a9a;
  203. margin-bottom: 11px;
  204. transition: color 0.2s ease-out;
  205. }
  206. .todo-list li .destroy:hover {
  207. color: #af5b5e;
  208. }
  209. .todo-list li .destroy:after {
  210. content: '×';
  211. }
  212. .todo-list li:hover .destroy {
  213. display: block;
  214. }
  215. .todo-list li .edit {
  216. display: none;
  217. }
  218. .todo-list li.editing:last-child {
  219. margin-bottom: -1px;
  220. }
  221. .footer {
  222. color: #777;
  223. padding: 10px 15px;
  224. height: 20px;
  225. text-align: center;
  226. border-top: 1px solid #e6e6e6;
  227. }
  228. .footer:before {
  229. content: '';
  230. position: absolute;
  231. right: 0;
  232. bottom: 0;
  233. left: 0;
  234. height: 50px;
  235. overflow: hidden;
  236. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2),
  237. 0 8px 0 -3px #f6f6f6,
  238. 0 9px 1px -3px rgba(0, 0, 0, 0.2),
  239. 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. }