1
0

todomvc.css 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. html,
  2. body, pre {
  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. text-align: center;
  103. border: none;
  104. /* 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;
  163. /* Mobile Safari */
  164. -webkit-appearance: none;
  165. appearance: none;
  166. }
  167. .todo-list li .toggle {
  168. opacity: 0;
  169. }
  170. .todo-list li .toggle+label {
  171. /*
  172. Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433
  173. 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/
  174. */
  175. 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');
  176. background-repeat: no-repeat;
  177. background-position: center left;
  178. }
  179. .todo-list li .toggle:checked+label {
  180. 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');
  181. }
  182. .todo-list li label {
  183. word-break: break-all;
  184. padding: 15px 15px 15px 60px;
  185. display: block;
  186. line-height: 1.2;
  187. transition: color 0.4s;
  188. }
  189. .todo-list li.completed label {
  190. color: #d9d9d9;
  191. text-decoration: line-through;
  192. }
  193. .todo-list li .destroy {
  194. display: none;
  195. position: absolute;
  196. top: 0;
  197. right: 10px;
  198. bottom: 0;
  199. width: 40px;
  200. height: 40px;
  201. margin: auto 0;
  202. font-size: 30px;
  203. color: #cc9a9a;
  204. margin-bottom: 11px;
  205. transition: color 0.2s ease-out;
  206. }
  207. .todo-list li .destroy:hover {
  208. color: #af5b5e;
  209. }
  210. .todo-list li .destroy:after {
  211. content: '×';
  212. }
  213. .todo-list li:hover .destroy {
  214. display: block;
  215. }
  216. .todo-list li .edit {
  217. display: none;
  218. }
  219. .todo-list li.editing:last-child {
  220. margin-bottom: -1px;
  221. }
  222. .footer {
  223. display: flex;
  224. justify-content: space-between;
  225. align-items: center;
  226. color: #777;
  227. padding: 10px 15px;
  228. height: 20px;
  229. text-align: center;
  230. border-top: 1px solid #e6e6e6;
  231. }
  232. .footer:before {
  233. content: '';
  234. position: absolute;
  235. right: 0;
  236. bottom: 0;
  237. left: 0;
  238. height: 50px;
  239. overflow: hidden;
  240. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 8px 0 -3px #f6f6f6, 0 9px 1px -3px rgba(0, 0, 0, 0.2), 0 16px 0 -6px #f6f6f6, 0 17px 2px -6px rgba(0, 0, 0, 0.2);
  241. }
  242. .todo-count {
  243. float: left;
  244. text-align: left;
  245. white-space-collapse: preserve;
  246. }
  247. .todo-count strong {
  248. font-weight: 300;
  249. }
  250. .filters {
  251. margin: 0;
  252. padding: 0;
  253. list-style: none;
  254. position: absolute;
  255. right: 0;
  256. left: 0;
  257. }
  258. .filters li {
  259. display: inline;
  260. }
  261. .filters li a {
  262. display: inline-block;
  263. color: inherit;
  264. margin: 3px;
  265. padding: 3px 7px;
  266. text-decoration: none;
  267. border: 1px solid transparent;
  268. border-radius: 3px;
  269. }
  270. .filters li a:hover {
  271. border-color: rgba(175, 47, 47, 0.1);
  272. }
  273. .filters li a.selected {
  274. border-color: rgba(175, 47, 47, 0.2);
  275. }
  276. .clear-completed,
  277. html .clear-completed:active {
  278. float: right;
  279. position: relative;
  280. line-height: 20px;
  281. text-decoration: none;
  282. cursor: pointer;
  283. }
  284. .clear-completed:hover {
  285. text-decoration: underline;
  286. }
  287. .info {
  288. margin: 65px auto 0;
  289. color: #bfbfbf;
  290. font-size: 10px;
  291. text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  292. text-align: center;
  293. }
  294. .info p {
  295. line-height: 1;
  296. }
  297. .info a {
  298. color: inherit;
  299. text-decoration: none;
  300. font-weight: 400;
  301. }
  302. .info a:hover {
  303. text-decoration: underline;
  304. }
  305. /*
  306. Hack to remove background from Mobile Safari.
  307. Can't use it globally since it destroys checkboxes in Firefox
  308. */
  309. @media screen and (-webkit-min-device-pixel-ratio:0) {
  310. .toggle-all,
  311. .todo-list li .toggle {
  312. background: none;
  313. }
  314. .todo-list li .toggle {
  315. height: 40px;
  316. }
  317. }
  318. @media (max-width: 430px) {
  319. .footer {
  320. height: 50px;
  321. }
  322. .filters {
  323. bottom: 10px;
  324. }
  325. }