Commit c5a433ff authored by Nick Stenning's avatar Nick Stenning

Merge pull request #1487 from hypothesis/tag-input-tweaks-alt

Prevent tag input field from changing height
parents 0aba593d 7f71611c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// http://mbenford.github.io/ngTagsInput/gettingstarted // http://mbenford.github.io/ngTagsInput/gettingstarted
@import "mixins/forms"; @import "mixins/forms";
@import "compass/css3/user-interface";
tags-input { tags-input {
.host { .host {
...@@ -10,7 +11,7 @@ tags-input { ...@@ -10,7 +11,7 @@ tags-input {
.tags { .tags {
@include form-input; @include form-input;
@include clearfix; @include pie-clearfix;
&.focused { &.focused {
@include form-input-focus; @include form-input-focus;
...@@ -19,23 +20,28 @@ tags-input { ...@@ -19,23 +20,28 @@ tags-input {
// Input // Input
.input { .input {
float: left; float: left;
margin-top: .1875em; padding: .1333em 0;
padding: .2em 0;
outline: none; outline: none;
border: none !important; border: none !important;
background: none; background: none;
color: $gray; color: $gray;
// Firefox and Webkit render input boxes at different heights. This
// causes issues when the tags (which render consistentely) are inserted
// and cause the height of the faux input to jump.
height: 1.4667em;
} }
} }
.tag-list { .tag-list {
margin-top: -.33em; // Absorb the first row of margin-top on the tags. margin-top: -.33em; // Absorb the first row of margin-top on the tags.
float: left;
} }
.tag-item { .tag-item {
float: left; float: left;
position: relative; position: relative;
padding: .154em 1.307em .154em .538em; padding: .0769em 1.307em .0769em .538em;
margin-top: .384em; margin-top: .384em;
margin-right: .384em; margin-right: .384em;
font-size: .866em; font-size: .866em;
...@@ -49,15 +55,16 @@ tags-input { ...@@ -49,15 +55,16 @@ tags-input {
} }
.remove-button { .remove-button {
@include user-select(none);
display: block; display: block;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
width: 16px; width: .9412em;
font-size: 17px; font-size: 1.3077em;
font-weight: bold; font-weight: bold;
line-height: 1.2; line-height: 1;
text-align: center; text-align: center;
color: #585858; color: #585858;
cursor: pointer; cursor: pointer;
...@@ -66,7 +73,7 @@ tags-input { ...@@ -66,7 +73,7 @@ tags-input {
} }
.tags-read-only { .tags-read-only {
font-size: 11px; font-size: .8461em;
margin: .4545em 0; margin: .4545em 0;
.tag-list { .tag-list {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment