diff --git a/assets/css/examples/todomvc.css b/assets/css/examples/todomvc.css index 8247161..233fb39 100644 --- a/assets/css/examples/todomvc.css +++ b/assets/css/examples/todomvc.css @@ -1,4 +1,4 @@ -body { +.program { margin: 0 auto; padding: 0; font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; @@ -16,7 +16,7 @@ body { min-width: 450px; max-width: 650px; height: auto; - margin: 130px auto 40px auto; + margin: 140px auto 40px auto; background: #fff; position: relative; @@ -66,7 +66,7 @@ body { .todoapp h1 { position: absolute; - top: -155px; + top: -165px; width: 100%; font-size: 100px; font-weight: 100; @@ -112,11 +112,20 @@ body { .todoapp .toggle-all { position: absolute; top: 12px; - left: 14px; + left: -10px; width: 60px; height: 34px; text-align: center; border: none; /* Mobile Safari */ + border: none; /* Mobile Safari */ + -webkit-appearance: none; + appearance: none; +} +.todoapp .toggle-all:after { + content: url('data:image/svg+xml;utf8,'); +} +.todoapp .toggle-all:checked:after { + content: url('data:image/svg+xml;utf8,'); } .todoapp .main { @@ -205,7 +214,7 @@ body { margin: auto 0; font-size: 30px; color: #cc9a9a; - margin-bottom: 11px; + vertical-align: middle; transition: color 0.2s ease-out; } @@ -216,7 +225,7 @@ body { .todoapp .todo-list li .destroy:after { position: relative; content: "×"; - top: 8px; + top: -2px; } .todoapp .todo-list li:hover .destroy { diff --git a/programs/todomvc.eve b/programs/todomvc.eve index 88f1f88..69c2d1b 100644 --- a/programs/todomvc.eve +++ b/programs/todomvc.eve @@ -100,7 +100,7 @@ bind [#ui/input #todo-checkbox todo, type: "checkbox", checked: completed, class: "toggle" class: [hidden: editing]] [#html/element tagname: "label" #todo-item, class: [hidden: editing], todo, text: body] [#ui/input #todo-editor todo, value: body, autofocus: "true", class: "edit" class: [hidden: logic/toggle[value: editing]]] - [#ui/button #remove-todo todo, class: "destroy" class: [hidden: editing]]] + [#ui/button #remove-todo todo, class: "flat destroy" class: [hidden: editing]]] ~~~ Thanks to Eve's set semantics, we don't need any loops here; for every unique `#todo` in the database, Eve will do the work of adding another `#li` as a child of `#todo-list`.