From 928827edd3bacac36492894c18d035a2bd884f95 Mon Sep 17 00:00:00 2001 From: KostyaDanovsky Date: Wed, 25 Nov 2015 16:51:02 +0300 Subject: [PATCH] add animation to todo list --- .../pages/dashboard/widgets/todo/_todo.scss | 48 ++++++++++++++----- .../pages/dashboard/widgets/todo/todo.html | 8 ++-- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/app/pages/dashboard/widgets/todo/_todo.scss b/src/app/pages/dashboard/widgets/todo/_todo.scss index 667a0be..6fdd91e 100644 --- a/src/app/pages/dashboard/widgets/todo/_todo.scss +++ b/src/app/pages/dashboard/widgets/todo/_todo.scss @@ -48,17 +48,6 @@ ul.todo-list { } } - i.mark { - display: block; - position: absolute; - top: -1px; - left: -1px; - height: 42px; - width: 4px; - background: $input-border; - cursor: pointer; - } - @mixin mark($color) { i.mark { background: $color; @@ -79,6 +68,36 @@ ul.todo-list { &.warning { @include mark($warning); } + + i.mark { + display: block; + position: absolute; + top: -1px; + left: -1px; + height: 42px; + min-width: 4px; + background: $input-border; + cursor: pointer; + transition: min-width 0.3s ease-out; + } + + &.active { + i.mark { + min-width: 40px; + } + label.todo-checkbox>span { + &:before { + color: white; + content: '\f10c'; + margin-right: 20px; + transition: margin-right 0.1s ease-out; + transition-delay: 0.2s; + } + } + label.todo-checkbox>input:checked+span:before { + content: '\f00c'; + } + } } } @@ -87,8 +106,13 @@ label.todo-checkbox { padding-right: 25px; min-height: 16px; cursor: pointer; - span { + >span { white-space: nowrap; height: 16px; + &:before { + border: none; + color: $help-text; + transition: all 0.15s ease-out; + } } } \ No newline at end of file diff --git a/src/app/pages/dashboard/widgets/todo/todo.html b/src/app/pages/dashboard/widgets/todo/todo.html index 6270e1e..90bb9c7 100644 --- a/src/app/pages/dashboard/widgets/todo/todo.html +++ b/src/app/pages/dashboard/widgets/todo/todo.html @@ -1,13 +1,13 @@ \ No newline at end of file