affix.less 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. @import './mixin';
  2. @import (reference) '../../style/themes/index';
  3. @input-prefix-cls: ~'@{ant-prefix}-input';
  4. @input-affix-margin: 4px;
  5. .@{ant-prefix}-input {
  6. &-affix-wrapper {
  7. .input();
  8. display: inline-flex;
  9. &:not(&-disabled):hover {
  10. .hover();
  11. z-index: 1;
  12. .@{ant-prefix}-input-search-with-button & {
  13. z-index: 0;
  14. }
  15. }
  16. &-focused,
  17. &:focus {
  18. z-index: 1;
  19. }
  20. &-disabled {
  21. .@{ant-prefix}-input[disabled] {
  22. background: transparent;
  23. }
  24. }
  25. > input.@{ant-prefix}-input {
  26. padding: 0;
  27. border: none;
  28. outline: none;
  29. &:focus {
  30. box-shadow: none !important;
  31. }
  32. }
  33. &::before {
  34. width: 0;
  35. visibility: hidden;
  36. content: '\a0';
  37. }
  38. }
  39. &-prefix,
  40. &-suffix {
  41. display: flex;
  42. flex: none;
  43. align-items: center;
  44. }
  45. &-show-count-suffix {
  46. color: @text-color-secondary;
  47. }
  48. &-show-count-has-suffix {
  49. margin-right: 2px;
  50. }
  51. &-prefix {
  52. margin-right: @input-affix-margin;
  53. }
  54. &-suffix {
  55. margin-left: @input-affix-margin;
  56. }
  57. }