nav.less 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. .@{steps-prefix-cls}-navigation {
  2. padding-top: 12px;
  3. &.@{steps-prefix-cls}-small {
  4. .@{steps-prefix-cls}-item {
  5. &-container {
  6. margin-left: -12px;
  7. }
  8. }
  9. }
  10. .@{steps-prefix-cls}-item {
  11. overflow: visible;
  12. text-align: center;
  13. &-container {
  14. display: inline-block;
  15. height: 100%;
  16. margin-left: -16px;
  17. padding-bottom: 12px;
  18. text-align: left;
  19. transition: opacity 0.3s;
  20. .@{steps-prefix-cls}-item-content {
  21. max-width: @steps-nav-content-max-width;
  22. }
  23. .@{steps-prefix-cls}-item-title {
  24. max-width: 100%;
  25. padding-right: 0;
  26. overflow: hidden;
  27. white-space: nowrap;
  28. text-overflow: ellipsis;
  29. &::after {
  30. display: none;
  31. }
  32. }
  33. }
  34. &:not(.@{steps-prefix-cls}-item-active) {
  35. .@{steps-prefix-cls}-item-container[role='button'] {
  36. cursor: pointer;
  37. &:hover {
  38. opacity: 0.85;
  39. }
  40. }
  41. }
  42. &:last-child {
  43. flex: 1;
  44. &::after {
  45. display: none;
  46. }
  47. }
  48. &::after {
  49. position: absolute;
  50. top: 50%;
  51. left: 100%;
  52. display: inline-block;
  53. width: 12px;
  54. height: 12px;
  55. margin-top: -14px;
  56. margin-left: -2px;
  57. border: 1px solid @steps-nav-arrow-color;
  58. border-bottom: none;
  59. border-left: none;
  60. transform: rotate(45deg);
  61. content: '';
  62. }
  63. &::before {
  64. position: absolute;
  65. bottom: 0;
  66. left: 50%;
  67. display: inline-block;
  68. width: 0;
  69. height: 2px;
  70. background-color: @steps-nav-active-color;
  71. transition: width 0.3s, left 0.3s;
  72. transition-timing-function: ease-out;
  73. content: '';
  74. }
  75. }
  76. .@{steps-prefix-cls}-item.@{steps-prefix-cls}-item-active::before {
  77. left: 0;
  78. width: 100%;
  79. }
  80. }
  81. .@{steps-prefix-cls}-navigation.@{steps-prefix-cls}-vertical {
  82. > .@{steps-prefix-cls}-item {
  83. margin-right: 0 !important;
  84. &::before {
  85. display: none;
  86. }
  87. &.@{steps-prefix-cls}-item-active::before {
  88. top: 0;
  89. right: 0;
  90. left: unset;
  91. display: block;
  92. width: 3px;
  93. height: calc(100% - 24px);
  94. }
  95. &::after {
  96. position: relative;
  97. top: -2px;
  98. left: 50%;
  99. display: block;
  100. width: 8px;
  101. height: 8px;
  102. margin-bottom: 8px;
  103. text-align: center;
  104. transform: rotate(135deg);
  105. }
  106. > .@{steps-prefix-cls}-item-container > .@{steps-prefix-cls}-item-tail {
  107. visibility: hidden;
  108. }
  109. }
  110. }
  111. .@{steps-prefix-cls}-navigation.@{steps-prefix-cls}-horizontal {
  112. > .@{steps-prefix-cls}-item
  113. > .@{steps-prefix-cls}-item-container
  114. > .@{steps-prefix-cls}-item-tail {
  115. visibility: hidden;
  116. }
  117. }