index.css 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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. label[for='toggle-all'] {
  103. display: none;
  104. }
  105. .toggle-all {
  106. position: absolute;
  107. top: -55px;
  108. left: -12px;
  109. width: 60px;
  110. height: 34px;
  111. text-align: center;
  112. border: none; /* Mobile Safari */
  113. }
  114. .toggle-all:before {
  115. content: '❯';
  116. font-size: 22px;
  117. color: #e6e6e6;
  118. padding: 10px 27px 10px 27px;
  119. }
  120. .toggle-all:checked:before {
  121. color: #737373;
  122. }
  123. .todo-list {
  124. margin: 0;
  125. padding: 0;
  126. list-style: none;
  127. }
  128. .todo-list li {
  129. position: relative;
  130. font-size: 24px;
  131. border-bottom: 1px solid #ededed;
  132. }
  133. .todo-list li:last-child {
  134. border-bottom: none;
  135. }
  136. .todo-list li.editing {
  137. border-bottom: none;
  138. padding: 0;
  139. }
  140. .todo-list li.editing .edit {
  141. display: block;
  142. width: 506px;
  143. padding: 12px 16px;
  144. margin: 0 0 0 43px;
  145. }
  146. .todo-list li.editing .view {
  147. display: none;
  148. }
  149. .todo-list li .toggle {
  150. text-align: center;
  151. width: 40px;
  152. /* auto, since non-WebKit browsers doesn't support input styling */
  153. height: auto;
  154. position: absolute;
  155. top: 0;
  156. bottom: 0;
  157. margin: auto 0;
  158. border: none; /* Mobile Safari */
  159. /* -webkit-appearance: none; */
  160. appearance: none;
  161. }
  162. .todo-list li .toggle:after {
  163. 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>');
  164. }
  165. .todo-list li .toggle:checked:after {
  166. 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>');
  167. }
  168. .todo-list li label {
  169. word-break: break-all;
  170. padding: 15px 60px 15px 15px;
  171. margin-left: 45px;
  172. display: block;
  173. line-height: 1.2;
  174. transition: color 0.4s;
  175. }
  176. .todo-list li.completed label {
  177. color: #d9d9d9;
  178. text-decoration: line-through;
  179. }
  180. .todo-list li .destroy {
  181. display: none;
  182. position: absolute;
  183. top: 0;
  184. right: 10px;
  185. bottom: 0;
  186. width: 40px;
  187. height: 40px;
  188. margin: auto 0;
  189. font-size: 30px;
  190. color: #cc9a9a;
  191. margin-bottom: 11px;
  192. transition: color 0.2s ease-out;
  193. }
  194. .todo-list li .destroy:hover {
  195. color: #af5b5e;
  196. }
  197. .todo-list li .destroy:after {
  198. content: '×';
  199. }
  200. .todo-list li:hover .destroy {
  201. display: block;
  202. }
  203. .todo-list li .edit {
  204. display: none;
  205. }
  206. .todo-list li.editing:last-child {
  207. margin-bottom: -1px;
  208. }
  209. .footer {
  210. color: #777;
  211. padding: 10px 15px;
  212. height: 20px;
  213. text-align: center;
  214. border-top: 1px solid #e6e6e6;
  215. }
  216. .footer:before {
  217. content: '';
  218. position: absolute;
  219. right: 0;
  220. bottom: 0;
  221. left: 0;
  222. height: 50px;
  223. overflow: hidden;
  224. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2),
  225. 0 8px 0 -3px #f6f6f6,
  226. 0 9px 1px -3px rgba(0, 0, 0, 0.2),
  227. 0 16px 0 -6px #f6f6f6,
  228. 0 17px 2px -6px rgba(0, 0, 0, 0.2);
  229. }
  230. .todo-count {
  231. float: left;
  232. text-align: left;
  233. }
  234. .todo-count strong {
  235. font-weight: 300;
  236. }
  237. .filters {
  238. margin: 0;
  239. padding: 0;
  240. list-style: none;
  241. position: absolute;
  242. right: 0;
  243. left: 0;
  244. }
  245. .filters li {
  246. display: inline;
  247. }
  248. .filters li a {
  249. color: inherit;
  250. margin: 3px;
  251. padding: 3px 7px;
  252. text-decoration: none;
  253. border: 1px solid transparent;
  254. border-radius: 3px;
  255. }
  256. .filters li a:hover {
  257. border-color: rgba(175, 47, 47, 0.1);
  258. }
  259. .filters li a.selected {
  260. border-color: rgba(175, 47, 47, 0.2);
  261. }
  262. .clear-completed,
  263. html .clear-completed:active {
  264. float: right;
  265. position: relative;
  266. line-height: 20px;
  267. text-decoration: none;
  268. cursor: pointer;
  269. }
  270. .clear-completed:hover {
  271. text-decoration: underline;
  272. }
  273. .info {
  274. margin: 65px auto 0;
  275. color: #bfbfbf;
  276. font-size: 10px;
  277. text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  278. text-align: center;
  279. }
  280. .info p {
  281. line-height: 1;
  282. }
  283. .info a {
  284. color: inherit;
  285. text-decoration: none;
  286. font-weight: 400;
  287. }
  288. .info a:hover {
  289. text-decoration: underline;
  290. }
  291. /*
  292. Hack to remove background from Mobile Safari.
  293. Can't use it globally since it destroys checkboxes in Firefox
  294. */
  295. @media screen and (-webkit-min-device-pixel-ratio:0) {
  296. .toggle-all,
  297. .todo-list li .toggle {
  298. background: none;
  299. }
  300. .todo-list li .toggle {
  301. height: 40px;
  302. }
  303. .toggle-all {
  304. -webkit-transform: rotate(90deg);
  305. transform: rotate(90deg);
  306. -webkit-appearance: none;
  307. appearance: none;
  308. }
  309. }
  310. @media (max-width: 430px) {
  311. .footer {
  312. height: 50px;
  313. }
  314. .filters {
  315. bottom: 10px;
  316. }
  317. }