pillbox.less 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .pillbox {
  2. border: 1px solid #BBBBBB;
  3. border-radius: 4px;
  4. cursor: text;
  5. padding: 3px;
  6. &[data-readonly] {
  7. border: 1px solid transparent;
  8. &.truncate {
  9. .pillbox-input-wrap {
  10. display: inline-block;
  11. &.truncated {
  12. display: none;
  13. }
  14. }
  15. .pillbox-more {
  16. display: inline;
  17. }
  18. }
  19. .pill {
  20. span.glyphicon-close {
  21. display: none;
  22. }
  23. }
  24. .pillbox-add-item {
  25. display: none;
  26. }
  27. .pillbox-input-wrap {
  28. display: none;
  29. button.dropdown-toggle {
  30. display: none;
  31. }
  32. }
  33. }
  34. &.pills-editable {
  35. .pill-group {
  36. .pill {
  37. span {
  38. cursor: text;
  39. &.glyphicon-close {
  40. cursor: pointer;
  41. }
  42. }
  43. }
  44. }
  45. }
  46. > .pill-group {
  47. margin: 0;
  48. padding: 0;
  49. width: 100%;
  50. > .pill {
  51. margin: 2px;
  52. cursor: default;
  53. float:left;
  54. word-break: break-all;
  55. &.pillbox-highlight {
  56. outline: 1px dotted @grayLight;
  57. }
  58. &.truncated {
  59. display: none;
  60. }
  61. .pillbox-list-edit {
  62. border: none;
  63. color: @grayDark;
  64. font-weight: normal;
  65. border-radius: 2px;
  66. &:focus {
  67. outline: none;
  68. border: none;
  69. }
  70. }
  71. .glyphicon-close {
  72. cursor: pointer;
  73. top: -1px;
  74. left: 2px;
  75. &:before {
  76. content: " \00d7";
  77. }
  78. &:hover {
  79. opacity: .4;
  80. }
  81. }
  82. }
  83. }
  84. .pillbox-input-wrap {
  85. position: relative;
  86. margin: 4px 0 3px 3px;
  87. float: left;
  88. &.editing {
  89. border: 1px solid #ccc;
  90. border-radius: 4px;
  91. margin: 2px 0 3px 3px;
  92. input.pillbox-add-item {
  93. border-radius: 4px;
  94. color: #333;
  95. height: 32px;
  96. }
  97. }
  98. }
  99. .pillbox-add-item {
  100. border: none;
  101. box-shadow: none;
  102. &:focus {
  103. outline: none;
  104. border: none;
  105. }
  106. }
  107. .pillbox-more {
  108. cursor: pointer;
  109. display: none;
  110. line-height: 30px;
  111. }
  112. .suggest {
  113. max-height: 166px; // arbitrary number
  114. overflow-y: auto;
  115. > li {
  116. white-space: nowrap;
  117. cursor: pointer;
  118. padding: 3px 20px;
  119. &.pillbox-suggest-sel {
  120. background-color: @grayLighter;
  121. }
  122. &:hover {
  123. background-color: @grayLighter;
  124. }
  125. }
  126. }
  127. input {
  128. &::-ms-clear {
  129. display:none;
  130. }
  131. }
  132. }