core.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. .select2-container {
  2. box-sizing: border-box;
  3. display: inline-block;
  4. margin: 0;
  5. position: relative;
  6. vertical-align: middle;
  7. }
  8. @import "single";
  9. @import "multiple";
  10. @import "dropdown";
  11. @import "theme/default/layout";
  12. .s2-container {
  13. margin: 0;
  14. position: relative;
  15. zoom: 1;
  16. vertical-align: middle;
  17. &.s2-active {
  18. border: 1px solid #5897fb;
  19. border-top: bottom;
  20. }
  21. .s2-single-select {
  22. display: block;
  23. height: 26px;
  24. padding: 0 0 0 8px;
  25. overflow: hidden;
  26. position: relative;
  27. border: 1px solid #aaa;
  28. white-space: nowrap;
  29. line-height: 26px;
  30. color: #444;
  31. text-decoration: none;
  32. border-radius: 4px;
  33. background-clip: padding-box;
  34. -webkit-touch-callout: none;
  35. -webkit-user-select: none;
  36. -moz-user-select: none;
  37. -ms-user-select: none;
  38. user-select: none;
  39. background-color: #fff;
  40. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
  41. background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
  42. background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
  43. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
  44. background-image: linear-gradient(to top, #eee 0%, #fff 50%);
  45. .s2-selection {
  46. margin-right: 26px;
  47. display: block;
  48. overflow: hidden;
  49. white-space: nowrap;
  50. text-overflow: ellipsis;
  51. }
  52. }
  53. .s2-open {
  54. .select2-container-active .select2-choice,
  55. .select2-container-active .select2-choices {
  56. border: 1px solid #5897fb;
  57. outline: none;
  58. -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
  59. box-shadow: 0 0 5px rgba(0, 0, 0, .3);
  60. }
  61. }
  62. }
  63. .s2-search {
  64. input {
  65. -webkit-box-sizing: border-box; /* webkit */
  66. -moz-box-sizing: border-box; /* firefox */
  67. box-sizing: border-box; /* css3 */
  68. }
  69. }
  70. .s2-dropdown {
  71. width: 100%;
  72. margin-top: -1px;
  73. position: absolute;
  74. z-index: 9999;
  75. overflow: scroll;
  76. background: #fff;
  77. color: #000;
  78. border: 1px solid #5897fb;
  79. border-top: none;
  80. border-radius: 0 0 4px 4px;
  81. -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  82. box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  83. }
  84. .s2-hidden {
  85. display: none;
  86. }