todomvc.css 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  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. color: inherit;
  15. -webkit-appearance: none;
  16. -ms-appearance: none;
  17. -o-appearance: none;
  18. appearance: none;
  19. }
  20. body {
  21. font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
  22. line-height: 1.4em;
  23. background: #eaeaea url("../images/bg.png");
  24. color: #4d4d4d;
  25. width: 550px;
  26. margin: 0 auto;
  27. -webkit-font-smoothing: antialiased;
  28. -moz-font-smoothing: antialiased;
  29. -ms-font-smoothing: antialiased;
  30. -o-font-smoothing: antialiased;
  31. font-smoothing: antialiased;
  32. }
  33. button,
  34. input[type="checkbox"] {
  35. outline: none;
  36. }
  37. #todoapp {
  38. background: #fff;
  39. background: rgba(255, 255, 255, 0.9);
  40. margin: 130px 0 40px 0;
  41. border: 1px solid #ccc;
  42. position: relative;
  43. border-top-left-radius: 2px;
  44. border-top-right-radius: 2px;
  45. box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.15);
  46. }
  47. #todoapp:before {
  48. content: '';
  49. border-left: 1px solid #f5d6d6;
  50. border-right: 1px solid #f5d6d6;
  51. width: 2px;
  52. position: absolute;
  53. top: 0;
  54. left: 40px;
  55. height: 100%;
  56. }
  57. #todoapp input::-webkit-input-placeholder {
  58. font-style: italic;
  59. }
  60. #todoapp input::-moz-placeholder {
  61. font-style: italic;
  62. color: #a9a9a9;
  63. }
  64. #todoapp h1 {
  65. position: absolute;
  66. top: -120px;
  67. width: 100%;
  68. font-size: 70px;
  69. font-weight: bold;
  70. text-align: center;
  71. color: #b3b3b3;
  72. color: rgba(255, 255, 255, 0.3);
  73. text-shadow: -1px -1px rgba(0, 0, 0, 0.2);
  74. -webkit-text-rendering: optimizeLegibility;
  75. -moz-text-rendering: optimizeLegibility;
  76. -ms-text-rendering: optimizeLegibility;
  77. -o-text-rendering: optimizeLegibility;
  78. text-rendering: optimizeLegibility;
  79. }
  80. #header {
  81. padding-top: 15px;
  82. border-radius: inherit;
  83. }
  84. #header:before {
  85. content: '';
  86. position: absolute;
  87. top: 0;
  88. right: 0;
  89. left: 0;
  90. height: 15px;
  91. z-index: 2;
  92. border-bottom: 1px solid #6c615c;
  93. background: #8d7d77;
  94. background: -webkit-gradient(linear, left top, left bottom, from(rgba(132, 110, 100, 0.8)), to(rgba(101, 84, 76, 0.8)));
  95. background: -webkit-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8));
  96. background: linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8));
  97. filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#9d8b83', EndColorStr='#847670');
  98. border-top-left-radius: 1px;
  99. border-top-right-radius: 1px;
  100. }
  101. #new-todo,
  102. .edit {
  103. position: relative;
  104. margin: 0;
  105. width: 100%;
  106. font-size: 24px;
  107. font-family: inherit;
  108. line-height: 1.4em;
  109. border: 0;
  110. outline: none;
  111. color: inherit;
  112. padding: 6px;
  113. border: 1px solid #999;
  114. box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
  115. -moz-box-sizing: border-box;
  116. -ms-box-sizing: border-box;
  117. -o-box-sizing: border-box;
  118. box-sizing: border-box;
  119. -webkit-font-smoothing: antialiased;
  120. -moz-font-smoothing: antialiased;
  121. -ms-font-smoothing: antialiased;
  122. -o-font-smoothing: antialiased;
  123. font-smoothing: antialiased;
  124. }
  125. #new-todo {
  126. padding: 16px 16px 16px 60px;
  127. border: none;
  128. background: rgba(0, 0, 0, 0.02);
  129. z-index: 2;
  130. box-shadow: none;
  131. }
  132. #main {
  133. position: relative;
  134. z-index: 2;
  135. border-top: 1px dotted #adadad;
  136. }
  137. label[for='toggle-all'] {
  138. display: none;
  139. }
  140. #toggle-all {
  141. position: absolute;
  142. top: -42px;
  143. left: -4px;
  144. width: 40px;
  145. text-align: center;
  146. /* Mobile Safari */
  147. border: none;
  148. }
  149. #toggle-all:before {
  150. content: '»';
  151. font-size: 28px;
  152. color: #d9d9d9;
  153. padding: 0 25px 7px;
  154. }
  155. #toggle-all:checked:before {
  156. color: #737373;
  157. }
  158. #todo-list {
  159. margin: 0;
  160. padding: 0;
  161. list-style: none;
  162. }
  163. #todo-list li {
  164. position: relative;
  165. font-size: 24px;
  166. border-bottom: 1px dotted #ccc;
  167. }
  168. #todo-list li:last-child {
  169. border-bottom: none;
  170. }
  171. #todo-list li.editing {
  172. border-bottom: none;
  173. padding: 0;
  174. }
  175. #todo-list li.editing .edit {
  176. display: block;
  177. width: 506px;
  178. padding: 13px 17px 12px 17px;
  179. margin: 0 0 0 43px;
  180. }
  181. #todo-list li.editing .view {
  182. display: none;
  183. }
  184. #todo-list li .toggle {
  185. text-align: center;
  186. width: 40px;
  187. /* auto, since non-WebKit browsers doesn't support input styling */
  188. height: auto;
  189. position: absolute;
  190. top: 0;
  191. bottom: 0;
  192. margin: auto 0;
  193. /* Mobile Safari */
  194. border: none;
  195. -webkit-appearance: none;
  196. -ms-appearance: none;
  197. -o-appearance: none;
  198. appearance: none;
  199. }
  200. #todo-list li .toggle:after {
  201. content: '✔';
  202. /* 40 + a couple of pixels visual adjustment */
  203. line-height: 43px;
  204. font-size: 20px;
  205. color: #d9d9d9;
  206. text-shadow: 0 -1px 0 #bfbfbf;
  207. }
  208. #todo-list li .toggle:checked:after {
  209. color: #85ada7;
  210. text-shadow: 0 1px 0 #669991;
  211. bottom: 1px;
  212. position: relative;
  213. }
  214. #todo-list li label {
  215. white-space: pre;
  216. word-break: break-word;
  217. padding: 15px 60px 15px 15px;
  218. margin-left: 45px;
  219. display: block;
  220. line-height: 1.2;
  221. -webkit-transition: color 0.4s;
  222. transition: color 0.4s;
  223. }
  224. #todo-list li.completed label {
  225. color: #a9a9a9;
  226. text-decoration: line-through;
  227. }
  228. #todo-list li .destroy {
  229. display: none;
  230. position: absolute;
  231. top: 0;
  232. right: 10px;
  233. bottom: 0;
  234. width: 40px;
  235. height: 40px;
  236. margin: auto 0;
  237. font-size: 22px;
  238. color: #a88a8a;
  239. -webkit-transition: all 0.2s;
  240. transition: all 0.2s;
  241. }
  242. #todo-list li .destroy:hover {
  243. text-shadow: 0 0 1px #000, 0 0 10px rgba(199, 107, 107, 0.8);
  244. -webkit-transform: scale(1.3);
  245. -ms-transform: scale(1.3);
  246. transform: scale(1.3);
  247. }
  248. #todo-list li .destroy:after {
  249. content: '✖';
  250. }
  251. #todo-list li:hover .destroy {
  252. display: block;
  253. }
  254. #todo-list li .edit {
  255. display: none;
  256. }
  257. #todo-list li.editing:last-child {
  258. margin-bottom: -1px;
  259. }
  260. #footer {
  261. color: #777;
  262. padding: 0 15px;
  263. position: absolute;
  264. right: 0;
  265. bottom: -31px;
  266. left: 0;
  267. height: 20px;
  268. z-index: 1;
  269. text-align: center;
  270. }
  271. #footer:before {
  272. content: '';
  273. position: absolute;
  274. right: 0;
  275. bottom: 31px;
  276. left: 0;
  277. height: 50px;
  278. z-index: -1;
  279. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 6px 0 -3px rgba(255, 255, 255, 0.8), 0 7px 1px -3px rgba(0, 0, 0, 0.3), 0 43px 0 -6px rgba(255, 255, 255, 0.8), 0 44px 2px -6px rgba(0, 0, 0, 0.2);
  280. }
  281. #todo-count {
  282. float: left;
  283. text-align: left;
  284. }
  285. #filters {
  286. margin: 0;
  287. padding: 0;
  288. list-style: none;
  289. position: absolute;
  290. right: 0;
  291. left: 0;
  292. }
  293. #filters li {
  294. display: inline;
  295. }
  296. #filters li a {
  297. color: #83756f;
  298. margin: 2px;
  299. text-decoration: none;
  300. }
  301. #filters li a.selected {
  302. font-weight: bold;
  303. }
  304. #clear-completed {
  305. float: right;
  306. position: relative;
  307. line-height: 20px;
  308. text-decoration: none;
  309. background: rgba(0, 0, 0, 0.1);
  310. font-size: 11px;
  311. padding: 0 10px;
  312. border-radius: 3px;
  313. box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.2);
  314. }
  315. #clear-completed:hover {
  316. background: rgba(0, 0, 0, 0.15);
  317. box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.3);
  318. }
  319. #info {
  320. margin: 65px auto 0;
  321. color: #a6a6a6;
  322. font-size: 12px;
  323. text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  324. text-align: center;
  325. }
  326. #info a {
  327. color: inherit;
  328. }
  329. /*
  330. Hack to remove background from Mobile Safari.
  331. Can't use it globally since it destroys checkboxes in Firefox and Opera
  332. */
  333. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  334. #toggle-all,
  335. #todo-list li .toggle {
  336. background: none;
  337. }
  338. #todo-list li .toggle {
  339. height: 40px;
  340. }
  341. #toggle-all {
  342. top: -56px;
  343. left: -15px;
  344. width: 65px;
  345. height: 41px;
  346. -webkit-transform: rotate(90deg);
  347. -ms-transform: rotate(90deg);
  348. transform: rotate(90deg);
  349. -webkit-appearance: none;
  350. appearance: none;
  351. }
  352. }
  353. .hidden {
  354. display: none;
  355. }
  356. hr {
  357. margin: 20px 0;
  358. border: 0;
  359. border-top: 1px dashed #C5C5C5;
  360. border-bottom: 1px dashed #F7F7F7;
  361. }
  362. .learn a {
  363. font-weight: normal;
  364. text-decoration: none;
  365. color: #b83f45;
  366. }
  367. .learn a:hover {
  368. text-decoration: underline;
  369. color: #787e7e;
  370. }
  371. .learn h3,
  372. .learn h4,
  373. .learn h5 {
  374. margin: 10px 0;
  375. font-weight: 500;
  376. line-height: 1.2;
  377. color: #000;
  378. }
  379. .learn h3 {
  380. font-size: 24px;
  381. }
  382. .learn h4 {
  383. font-size: 18px;
  384. }
  385. .learn h5 {
  386. margin-bottom: 0;
  387. font-size: 14px;
  388. }
  389. .learn ul {
  390. padding: 0;
  391. margin: 0 0 30px 25px;
  392. }
  393. .learn li {
  394. line-height: 20px;
  395. }
  396. .learn p {
  397. font-size: 15px;
  398. font-weight: 300;
  399. line-height: 1.3;
  400. margin-top: 0;
  401. margin-bottom: 0;
  402. }
  403. .quote {
  404. border: none;
  405. margin: 20px 0 60px 0;
  406. }
  407. .quote p {
  408. font-style: italic;
  409. }
  410. .quote p:before {
  411. content: '“';
  412. font-size: 50px;
  413. opacity: .15;
  414. position: absolute;
  415. top: -20px;
  416. left: 3px;
  417. }
  418. .quote p:after {
  419. content: '”';
  420. font-size: 50px;
  421. opacity: .15;
  422. position: absolute;
  423. bottom: -42px;
  424. right: 3px;
  425. }
  426. .quote footer {
  427. position: absolute;
  428. bottom: -40px;
  429. right: 0;
  430. }
  431. .quote footer img {
  432. border-radius: 3px;
  433. }
  434. .quote footer a {
  435. margin-left: 5px;
  436. vertical-align: middle;
  437. }
  438. .speech-bubble {
  439. position: relative;
  440. padding: 10px;
  441. background: rgba(0, 0, 0, 0.04);
  442. border-radius: 5px;
  443. }
  444. .speech-bubble:after {
  445. content: '';
  446. position: absolute;
  447. top: 100%;
  448. right: 30px;
  449. border: 13px solid transparent;
  450. border-top-color: rgba(0, 0, 0, 0.04);
  451. }
  452. .learn-bar > .learn {
  453. position: absolute;
  454. width: 272px;
  455. top: 8px;
  456. left: -300px;
  457. padding: 10px;
  458. border-radius: 5px;
  459. background-color: rgba(255, 255, 255, 0.6);
  460. -webkit-transition-property: left;
  461. transition-property: left;
  462. -webkit-transition-duration: 500ms;
  463. transition-duration: 500ms;
  464. }
  465. @media (min-width: 899px) {
  466. .learn-bar {
  467. width: auto;
  468. margin: 0 0 0 300px;
  469. }
  470. .learn-bar > .learn {
  471. left: 8px;
  472. }
  473. .learn-bar #todoapp {
  474. width: 550px;
  475. margin: 130px auto 40px auto;
  476. }
  477. }