index.css 6.4 KB

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