From e4954140f86dec8f8c59a78fdbf73bb7366ea543 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 30 Jul 2016 12:20:40 +0200 Subject: [PATCH] client/tags: rewrite tag input Suggestions will be reimplemented in separate commit --- client/css/forms.styl | 43 +- client/css/posts.styl | 12 - client/html/post_readonly_sidebar.tpl | 2 +- client/js/controls/tag_input_control.js | 518 ++++++------------------ 4 files changed, 155 insertions(+), 420 deletions(-) diff --git a/client/css/forms.styl b/client/css/forms.styl index 3590c8c..1252dd9 100644 --- a/client/css/forms.styl +++ b/client/css/forms.styl @@ -134,7 +134,6 @@ input[type=checkbox]:focus + .checkbox:before /* * Regular inputs */ -div.tag-input, select, textarea, input[type=text], @@ -175,28 +174,26 @@ input:disabled cursor: not-allowed div.tag-input - min-height: 4.75em - vertical-align: top - display: inline-block - cursor: text - word-wrap: break-word - a - line-height: 110% - position: relative - z-index: 1 - span - line-height: 110% - &.new a - background: $new-tag-background-color - color: $new-tag-text-color - &.duplicate a - background: $duplicate-tag-background-color - color: $duplicate-tag-text-color - &.editable - outline: 0 - padding-right: 0.2em - &:last-child - padding-left: 0.2em + li.new + background: $new-tag-background-color + color: $new-tag-text-color + li.duplicate + background: $duplicate-tag-background-color + color: $duplicate-tag-text-color + ul + margin-top: 0.2em + +ul.compact-tags + line-height: 130% + word-break: break-all + li + margin: 0 + i + padding-right: 0.4em + .count + color: $inactive-link-color + padding-left: 0.7em + font-size: 90% div.tag-relations font-size: 80% diff --git a/client/css/posts.styl b/client/css/posts.styl index eb27199..805a54e 100644 --- a/client/css/posts.styl +++ b/client/css/posts.styl @@ -300,16 +300,8 @@ $safety-unsafe = #F3985F .tags margin-top: 2em - line-height: 130% - word-break: break-all h1 margin-bottom: 0.5em - i - padding-right: 0.4em - .count - color: $inactive-link-color - padding-left: 0.7em - font-size: 90% .post-view .edit-sidebar section @@ -324,10 +316,6 @@ $safety-unsafe = #F3985F flex-grow: 1 display: inline-block - .tags - .tag-input - min-height: 6.25em - label margin-bottom: 0.3em display: block diff --git a/client/html/post_readonly_sidebar.tpl b/client/html/post_readonly_sidebar.tpl index 0b096a8..0492b7e 100644 --- a/client/html/post_readonly_sidebar.tpl +++ b/client/html/post_readonly_sidebar.tpl @@ -63,7 +63,7 @@