index-pure.less 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @import '../../input/style/mixin';
  4. @import '../../checkbox/style/mixin';
  5. @cascader-prefix-cls: ~'@{ant-prefix}-cascader';
  6. .antCheckboxFn(@checkbox-prefix-cls: ~'@{cascader-prefix-cls}-checkbox');
  7. .@{cascader-prefix-cls} {
  8. width: 184px;
  9. &-checkbox {
  10. top: 0;
  11. margin-right: @padding-xs;
  12. }
  13. &-menus {
  14. display: flex;
  15. flex-wrap: nowrap;
  16. align-items: flex-start;
  17. &.@{cascader-prefix-cls}-menu-empty {
  18. .@{cascader-prefix-cls}-menu {
  19. width: 100%;
  20. height: auto;
  21. }
  22. }
  23. }
  24. &-menu {
  25. min-width: 111px;
  26. height: 180px;
  27. margin: 0;
  28. margin: -@dropdown-edge-child-vertical-padding 0;
  29. padding: @cascader-dropdown-edge-child-vertical-padding 0;
  30. overflow: auto;
  31. vertical-align: top;
  32. list-style: none;
  33. border-right: @border-width-base @border-style-base @cascader-menu-border-color-split;
  34. -ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
  35. &-item {
  36. display: flex;
  37. flex-wrap: nowrap;
  38. align-items: center;
  39. padding: @cascader-dropdown-vertical-padding @control-padding-horizontal;
  40. overflow: hidden;
  41. line-height: @cascader-dropdown-line-height;
  42. white-space: nowrap;
  43. text-overflow: ellipsis;
  44. cursor: pointer;
  45. transition: all 0.3s;
  46. &:hover {
  47. background: @item-hover-bg;
  48. }
  49. &-disabled {
  50. color: @disabled-color;
  51. cursor: not-allowed;
  52. &:hover {
  53. background: transparent;
  54. }
  55. }
  56. .@{cascader-prefix-cls}-menu-empty & {
  57. color: @disabled-color;
  58. cursor: default;
  59. pointer-events: none;
  60. }
  61. &-active:not(&-disabled) {
  62. &,
  63. &:hover {
  64. font-weight: @select-item-selected-font-weight;
  65. background-color: @cascader-item-selected-bg;
  66. }
  67. }
  68. &-content {
  69. flex: auto;
  70. }
  71. &-expand &-expand-icon,
  72. &-loading-icon {
  73. margin-left: @padding-xss;
  74. color: @text-color-secondary;
  75. font-size: 10px;
  76. .@{cascader-prefix-cls}-menu-item-disabled& {
  77. color: @disabled-color;
  78. }
  79. }
  80. &-keyword {
  81. color: @highlight-color;
  82. }
  83. }
  84. }
  85. }
  86. @import './rtl';