index.less 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @anchor-border-width: 2px;
  4. .@{ant-prefix}-anchor {
  5. .reset-component();
  6. position: relative;
  7. padding-left: @anchor-border-width;
  8. &-wrapper {
  9. margin-left: -4px;
  10. padding-left: 4px;
  11. overflow: auto;
  12. background-color: @anchor-bg;
  13. }
  14. &-ink {
  15. position: absolute;
  16. top: 0;
  17. left: 0;
  18. height: 100%;
  19. &::before {
  20. position: relative;
  21. display: block;
  22. width: @anchor-border-width;
  23. height: 100%;
  24. margin: 0 auto;
  25. background-color: @anchor-border-color;
  26. content: ' ';
  27. }
  28. &-ball {
  29. position: absolute;
  30. left: 50%;
  31. display: none;
  32. width: 8px;
  33. height: 8px;
  34. background-color: @component-background;
  35. border: 2px solid @primary-color;
  36. border-radius: 8px;
  37. transform: translateX(-50%);
  38. transition: top 0.3s ease-in-out;
  39. &.@{ant-prefix}-anchor-ink-ball-visible {
  40. display: inline-block;
  41. }
  42. }
  43. }
  44. &-fixed &-ink &-ink-ball {
  45. display: none;
  46. }
  47. &-link {
  48. padding: @anchor-link-padding;
  49. &-title {
  50. position: relative;
  51. display: block;
  52. margin-bottom: 3px;
  53. overflow: hidden;
  54. color: @text-color;
  55. white-space: nowrap;
  56. text-overflow: ellipsis;
  57. transition: all 0.3s;
  58. &:only-child {
  59. margin-bottom: 0;
  60. }
  61. }
  62. &-active > &-title {
  63. color: @primary-color;
  64. }
  65. }
  66. &-link &-link {
  67. padding-top: 2px;
  68. padding-bottom: 2px;
  69. }
  70. }
  71. @import './rtl';