search-input.less 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @import '../../button/style/mixin';
  4. @import './mixin';
  5. @search-prefix: ~'@{ant-prefix}-input-search';
  6. .@{search-prefix} {
  7. .@{ant-prefix}-input {
  8. &:hover,
  9. &:focus {
  10. border-color: @input-hover-border-color;
  11. + .@{ant-prefix}-input-group-addon .@{search-prefix}-button:not(.@{ant-prefix}-btn-primary) {
  12. border-left-color: @input-hover-border-color;
  13. }
  14. }
  15. }
  16. .@{ant-prefix}-input-affix-wrapper {
  17. border-radius: 0;
  18. }
  19. // fix slight height diff in Firefox:
  20. // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
  21. .@{ant-prefix}-input-lg {
  22. line-height: @line-height-base - 0.0002;
  23. }
  24. > .@{ant-prefix}-input-group {
  25. > .@{ant-prefix}-input-group-addon:last-child {
  26. left: -1px;
  27. padding: 0;
  28. border: 0;
  29. .@{search-prefix}-button {
  30. padding-top: 0;
  31. padding-bottom: 0;
  32. border-radius: 0 @border-radius-base @border-radius-base 0;
  33. }
  34. .@{search-prefix}-button:not(.@{ant-prefix}-btn-primary) {
  35. color: @text-color-secondary;
  36. &.@{ant-prefix}-btn-loading::before {
  37. top: 0;
  38. right: 0;
  39. bottom: 0;
  40. left: 0;
  41. }
  42. }
  43. }
  44. }
  45. &-button {
  46. height: @input-height-base;
  47. &:hover,
  48. &:focus {
  49. z-index: 1;
  50. }
  51. }
  52. &-large &-button {
  53. height: @input-height-lg;
  54. }
  55. &-small &-button {
  56. height: @input-height-sm;
  57. }
  58. }