multiselect.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /* Copyright (c) 2011, Jan-Christoph Borchardt, http: //jancborchardt.net
  2. This file is licensed under the Affero General Public License version 3 or later.
  3. See the COPYING-README file. */
  4. ul.multiselectoptions {
  5. background-color: #fff;
  6. border: 1px solid #ddd;
  7. border-top: none;
  8. box-shadow: 0 1px 1px #ddd;
  9. padding-top: 8px;
  10. position: absolute;
  11. max-height: 20em;
  12. overflow-y: auto;
  13. z-index: 49;
  14. &.down {
  15. border-bottom-left-radius: 8px;
  16. border-bottom-right-radius: 8px;
  17. width: 100%;
  18. /* do not cut off group names */
  19. -webkit-box-shadow: 0px 0px 20px rgba(29, 45, 68, 0.4);
  20. -moz-box-shadow: 0px 0px 20px rgba(29, 45, 68, 0.4);
  21. box-shadow: 0px 0px 20px rgba(29, 45, 68, 0.4);
  22. }
  23. &.up {
  24. border-top-left-radius: 8px;
  25. border-top-right-radius: 8px;
  26. }
  27. > li {
  28. overflow: hidden;
  29. white-space: nowrap;
  30. margin-left: 7px;
  31. input[type='checkbox'] {
  32. + label {
  33. font-weight: normal;
  34. display: inline-block;
  35. width: 100%;
  36. padding: 5px 27px;
  37. margin-left: -27px;
  38. /* to have area around checkbox clickable as well */
  39. text-overflow: ellipsis;
  40. overflow: hidden;
  41. }
  42. &:checked + label {
  43. font-weight: bold;
  44. }
  45. }
  46. }
  47. }
  48. div.multiselect {
  49. display: inline-block;
  50. max-width: 200px;
  51. min-width: 150px !important;
  52. padding-right: 10px;
  53. min-height: 20px;
  54. position: relative;
  55. vertical-align: bottom;
  56. }
  57. select.multiselect {
  58. display: inline-block;
  59. max-width: 200px;
  60. min-width: 150px !important;
  61. padding-right: 10px;
  62. min-height: 20px;
  63. position: relative;
  64. vertical-align: bottom;
  65. height: 30px;
  66. min-width: 113px;
  67. }
  68. /* To make a select look like a multiselect until it's initialized */
  69. div.multiselect {
  70. &.active {
  71. background-color: #fff;
  72. position: relative;
  73. z-index: 50;
  74. }
  75. &.up {
  76. border-top: 0 none;
  77. border-top-left-radius: 0;
  78. border-top-right-radius: 0;
  79. }
  80. &.down {
  81. border-bottom: none;
  82. border-bottom-left-radius: 0;
  83. border-bottom-right-radius: 0;
  84. }
  85. > span {
  86. &:first-child {
  87. float: left;
  88. margin-right: 32px;
  89. overflow: hidden;
  90. text-overflow: ellipsis;
  91. width: 90%;
  92. white-space: nowrap;
  93. }
  94. &:last-child {
  95. position: absolute;
  96. right: 8px;
  97. top: 8px;
  98. }
  99. }
  100. }
  101. ul.multiselectoptions {
  102. input.new {
  103. padding-bottom: 3px;
  104. padding-top: 3px;
  105. margin: 0;
  106. }
  107. > li.creator {
  108. padding: 10px;
  109. margin: 0;
  110. font-weight: bold;
  111. > input {
  112. width: 95% !important;
  113. /* do not constrain size of text input */
  114. padding: 5px;
  115. margin: -5px;
  116. }
  117. }
  118. }