index-pure.less 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. &.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. line-height: 1.143;
  50. &-title {
  51. position: relative;
  52. display: block;
  53. margin-bottom: 6px;
  54. overflow: hidden;
  55. color: @text-color;
  56. white-space: nowrap;
  57. text-overflow: ellipsis;
  58. transition: all 0.3s;
  59. &:only-child {
  60. margin-bottom: 0;
  61. }
  62. }
  63. &-active > &-title {
  64. color: @primary-color;
  65. }
  66. }
  67. &-link &-link {
  68. padding-top: 5px;
  69. padding-bottom: 5px;
  70. }
  71. }
  72. @import './rtl';