search-bar.css 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. .searchbar {
  2. height: 44px;
  3. box-sizing: border-box;
  4. padding: 0 8px;
  5. overflow: hidden;
  6. position: relative;
  7. display: -webkit-box;
  8. display: -ms-flexbox;
  9. display: -webkit-flex;
  10. display: flex;
  11. -webkit-box-align: center;
  12. -ms-flex-align: center;
  13. -webkit-align-items: center;
  14. align-items: center;
  15. background-color: #FFF;
  16. }
  17. html.pixel-ratio-2 .searchbar:after {
  18. -webkit-transform: scaleY(.5);
  19. transform: scaleY(.5)
  20. }
  21. html.pixel-ratio-3 .searchbar:after {
  22. -webkit-transform: scaleY(.33);
  23. transform: scaleY(.33)
  24. }
  25. .searchbar .searchbar-input {
  26. width: 100%;
  27. height: 28px;
  28. position: relative;
  29. -webkit-flex-shrink: 1;
  30. -ms-flex: 0 1 auto;
  31. flex-shrink: 1;
  32. }
  33. .searchbar input[type=search] {
  34. box-sizing: border-box;
  35. width: 100%;
  36. height: 100%;
  37. display: block;
  38. border: none;
  39. -webkit-appearance: none;
  40. -moz-appearance: none;
  41. -ms-appearance: none;
  42. appearance: none;
  43. border-radius: 5px;
  44. font-family: inherit;
  45. color: #000;
  46. font-size: 14px;
  47. font-weight: 400;
  48. padding: 0 28px;
  49. background-color: #fff;
  50. background-repeat: no-repeat;
  51. background-position: 8px center;
  52. background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9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54. background-size: 13px 13px;
  55. background-color: #F2F3F5;
  56. }
  57. .searchbar input[type=search]::-webkit-input-placeholder {
  58. color: #939398;
  59. opacity: 1
  60. }
  61. .searchbar input[type=search]::-webkit-search-cancel-button {
  62. -webkit-appearance: none
  63. }
  64. .searchbar .searchbar-clear {
  65. position: absolute;
  66. width: 28px;
  67. height: 28px;
  68. right: 0;
  69. top: 0;
  70. opacity: 0;
  71. pointer-events: none;
  72. background-position: center;
  73. background-repeat: no-repeat;
  74. background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2028%2028'%3E%3Ccircle%20cx%3D'14'%20cy%3D'14'%20r%3D'14'%20fill%3D'%238e8e93'%2F%3E%3Cline%20stroke%3D'%23ffffff'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'8'%20y1%3D'8'%20x2%3D'20'%20y2%3D'20'%2F%3E%3Cline%20fill%3D'none'%20stroke%3D'%23ffffff'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'20'%20y1%3D'8'%20x2%3D'8'%20y2%3D'20'%2F%3E%3C%2Fsvg%3E");
  75. -webkit-background-size: 14px 14px;
  76. background-size: 14px 14px;
  77. -webkit-transition-duration: .3s;
  78. transition-duration: .3s;
  79. cursor: pointer
  80. }
  81. .searchbar .searchbar-cancel {
  82. -webkit-transition-duration: .3s;
  83. transition-duration: .3s;
  84. -webkit-transform: translate3d(0,0,0);
  85. transform: translate3d(0,0,0);
  86. font-size: 17px;
  87. cursor: pointer;
  88. opacity: 0;
  89. -webkit-flex-shrink: 0;
  90. -ms-flex: 0 0 auto;
  91. flex-shrink: 0;
  92. margin-left: 0;
  93. pointer-events: none;
  94. display: none;
  95. color: #75BF00;
  96. }
  97. .searchbar.searchbar-active .searchbar-cancel {
  98. margin-left: 8px;
  99. opacity: 1;
  100. pointer-events: auto
  101. }
  102. .searchbar.searchbar-active .searchbar-cancel.active-state,html:not(.watch-active-state) .searchbar.searchbar-active .searchbar-cancel:active {
  103. opacity: .3;
  104. -webkit-transition-duration: 0s;
  105. transition-duration: 0s
  106. }