index.less 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. @import "../styles/mixins/index.less";
  2. @import "../styles/themes/index.less";
  3. .@{wux-prefix}-search-bar {
  4. position: relative;
  5. padding: 8px 10px;
  6. display: flex;
  7. box-sizing: border-box;
  8. background-color: @search-bar-bg;
  9. &::before {
  10. .setTopLine(@border-color-split);
  11. }
  12. &::after {
  13. .setBottomLine(@border-color-split);
  14. }
  15. &__form {
  16. position: relative;
  17. flex: 1;
  18. width: 100%;
  19. height: @search-bar-input-height;
  20. overflow: hidden;
  21. background-color: #fff;
  22. background-clip: padding-box;
  23. border-radius: @search-bar-radius;
  24. }
  25. &__box {
  26. position: relative;
  27. padding-left: 30px;
  28. padding-right: 30px;
  29. height: 100%;
  30. width: 100%;
  31. box-sizing: border-box;
  32. z-index: 1;
  33. }
  34. &__input {
  35. padding: 4px 0;
  36. width: 100%;
  37. height: @search-bar-input-height;
  38. min-height: inherit;
  39. border: 0;
  40. font-size: @search-bar-font-size;
  41. line-height: @search-bar-input-height;
  42. box-sizing: border-box;
  43. background: transparent;
  44. }
  45. &__label {
  46. display: flex;
  47. justify-content: center;
  48. align-items: center;
  49. position: absolute;
  50. top: 1px;
  51. right: 1px;
  52. bottom: 1px;
  53. left: 1px;
  54. z-index: 2;
  55. border-radius: @search-bar-radius;
  56. text-align: center;
  57. color: @text-color-secondary;
  58. background: #FFF;
  59. }
  60. &__text {
  61. display: inline-block;
  62. font-size: @search-bar-font-size;
  63. vertical-align: middle;
  64. margin-left: @margin-component-base;
  65. }
  66. &__cancel {
  67. margin-left: 10px;
  68. line-height: @search-bar-input-height;
  69. color: @balanced;
  70. white-space: nowrap;
  71. }
  72. &__icon {
  73. vertical-align: middle;
  74. }
  75. &__search {
  76. position: absolute;
  77. left: 10px;
  78. top: 8px;
  79. }
  80. &__clear {
  81. display: block;
  82. position: absolute;
  83. top: 8px;
  84. right: 0;
  85. padding: 0 10px;
  86. }
  87. &--disabled {
  88. opacity: @disabled-opacity;
  89. }
  90. }