index.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. flex-grow: 1;
  26. min-width: 111px;
  27. height: 180px;
  28. margin: 0;
  29. margin: -@dropdown-edge-child-vertical-padding 0;
  30. padding: @cascader-dropdown-edge-child-vertical-padding 0;
  31. overflow: auto;
  32. vertical-align: top;
  33. list-style: none;
  34. border-right: @border-width-base @border-style-base @cascader-menu-border-color-split;
  35. -ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
  36. &-item {
  37. display: flex;
  38. flex-wrap: nowrap;
  39. align-items: center;
  40. padding: @cascader-dropdown-vertical-padding @control-padding-horizontal;
  41. overflow: hidden;
  42. line-height: @cascader-dropdown-line-height;
  43. white-space: nowrap;
  44. text-overflow: ellipsis;
  45. cursor: pointer;
  46. transition: all 0.3s;
  47. &:hover {
  48. background: @item-hover-bg;
  49. }
  50. &-disabled {
  51. color: @disabled-color;
  52. cursor: not-allowed;
  53. &:hover {
  54. background: transparent;
  55. }
  56. }
  57. .@{cascader-prefix-cls}-menu-empty & {
  58. color: @disabled-color;
  59. cursor: default;
  60. pointer-events: none;
  61. }
  62. &-active:not(&-disabled) {
  63. &,
  64. &:hover {
  65. font-weight: @select-item-selected-font-weight;
  66. background-color: @cascader-item-selected-bg;
  67. }
  68. }
  69. &-content {
  70. flex: auto;
  71. }
  72. &-expand &-expand-icon,
  73. &-loading-icon {
  74. margin-left: @padding-xss;
  75. color: @text-color-secondary;
  76. font-size: 10px;
  77. .@{cascader-prefix-cls}-menu-item-disabled& {
  78. color: @disabled-color;
  79. }
  80. }
  81. &-keyword {
  82. color: @highlight-color;
  83. }
  84. }
  85. }
  86. // ===================== Compact Item Styles =====================
  87. .compact-item(@cascader-prefix-cls);
  88. }
  89. @import './rtl';