_chips.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .chip {
  2. &:focus {
  3. outline: none;
  4. background-color: $chip-selected-color;
  5. color: #fff;
  6. }
  7. display: inline-block;
  8. height: 32px;
  9. font-size: 13px;
  10. font-weight: 500;
  11. color: rgba(0,0,0,.6);
  12. line-height: 32px;
  13. padding: 0 12px;
  14. border-radius: 16px;
  15. background-color: $chip-bg-color;
  16. margin-bottom: $chip-margin;
  17. margin-right: $chip-margin;
  18. > img {
  19. float: left;
  20. margin: 0 8px 0 -12px;
  21. height: 32px;
  22. width: 32px;
  23. border-radius: 50%;
  24. }
  25. .close {
  26. cursor: pointer;
  27. float: right;
  28. font-size: 16px;
  29. line-height: 32px;
  30. padding-left: 8px;
  31. }
  32. }
  33. .chips {
  34. border: none;
  35. border-bottom: 1px solid $chip-border-color;
  36. box-shadow: none;
  37. margin: $input-margin;
  38. min-height: 45px;
  39. outline: none;
  40. transition: all .3s;
  41. &.focus {
  42. border-bottom: 1px solid $chip-selected-color;
  43. box-shadow: 0 1px 0 0 $chip-selected-color;
  44. }
  45. &:hover {
  46. cursor: text;
  47. }
  48. .input {
  49. background: none;
  50. border: 0;
  51. color: rgba(0,0,0,.6);
  52. display: inline-block;
  53. font-size: $input-font-size;
  54. height: $input-height;
  55. line-height: 32px;
  56. outline: 0;
  57. margin: 0;
  58. padding: 0 !important;
  59. width: 120px !important;
  60. }
  61. .input:focus {
  62. border: 0 !important;
  63. box-shadow: none !important;
  64. }
  65. // Autocomplete
  66. .autocomplete-content {
  67. margin-top: 0;
  68. margin-bottom: 0;
  69. }
  70. }
  71. // Form prefix
  72. .prefix ~ .chips {
  73. margin-left: 3rem;
  74. width: 92%;
  75. width: calc(100% - 3rem);
  76. }
  77. .chips:empty ~ label {
  78. font-size: 0.8rem;
  79. transform: translateY(-140%);
  80. }