Skip to content

Instantly share code, notes, and snippets.

@MarZab
Created February 4, 2014 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarZab/8803827 to your computer and use it in GitHub Desktop.
Save MarZab/8803827 to your computer and use it in GitHub Desktop.
// SCSS for https://github.com/mbenford/ngTagsInput/
// Marko Zabreznik 4.2.2014
.ngTagsInput {
* {
@include box-sizing(border-box);
&:before, &:after {
@include box-sizing(border-box);
}
}
position: relative;
&:active {
outline: none;
}
.tags {
@include appearance(textfield);
background-color: white;
background-color: -moz-field;
border: 1px solid darkgray;
@include box-shadow(lightgray 1px 1px 1px 0 inset);
margin-top: 5px;
padding: 2px 2px;
overflow-y: auto;
overflow-x: hidden;
word-wrap: break-word;
font-size: 14px;
cursor: text;
&.focused {
outline: none;
@include box-shadow(rgba(5, 139, 242, 0.6) 0px 0px 3px 1px);
}
.tag-list {
margin: 0px;
padding: 0px;
overflow: visible;
list-style-type: none;
}
.tag-item {
margin: 2px;
padding-left: 4px;
display: inline-block;
border-radius: 3px;
height: 21px;
line-height: 1.3;
border: 1px solid rgb(172, 172, 172);
float: left;
background: rgb(240, 249, 255);
@include background-image(linear-gradient(rgba(240, 249, 255, 1), rgba(203, 235, 255, 1) 47%, rgba(161, 219, 255, 1)));
&.selected {
background: rgb(254, 187, 187);
@include background-image(linear-gradient( rgba(254, 187, 187, 1), rgba(254, 144, 144, 1) 47%, rgba(255, 92, 92, 1)));
}
span {
font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
button {
margin: 0px;
border: none;
background: none;
color: #585858;
cursor: pointer;
font: bold 16px Arial, sans-serif;
vertical-align: middle;
&:active {
color: #ff0000;
}
}
}
.tag-input {
border: 0px;
outline: none;
margin: 2px;
padding: 0px 0px 0px 4px;
height: 21px;
float: left;
font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
input::-ms-clear {
display: none;
}
}
.autocomplete {
margin-top: 5px;
position: absolute;
padding: 8px 0;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.2);
@include box-shadow(rgba(0, 0, 0, 0.2) 0 5px 10px);
width: 100%;
z-index: 999;
.suggestion-list {
margin: 0;
padding: 0;
list-style-type: none;
}
.suggestion-item {
padding: 3px 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 20px;
cursor: pointer;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.selected {
color: #fff;
background-color: #0097cf;
}
em {
font-weight: bold;
font-style: normal;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment