index.less 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @import "../styles/mixins/index.less";
  2. @import "../styles/themes/index.less";
  3. .@{wux-prefix}-timeline-item {
  4. position: relative;
  5. padding: 0 0 12px;
  6. margin: 0;
  7. font-size: @timeline-font-size;
  8. box-sizing: border-box;
  9. &__tail {
  10. height: 100%;
  11. border-left: @timeline-width solid @timeline-color;
  12. position: absolute;
  13. left: 5px;
  14. top: 0;
  15. box-sizing: border-box;
  16. }
  17. &__dot {
  18. .square(@timeline-dot-size);
  19. background-color: @timeline-dot-bg;
  20. border-radius: 50%;
  21. border: @timeline-dot-border-width solid @timeline-dot-color;
  22. position: absolute;
  23. color: @timeline-dot-color;
  24. box-sizing: border-box;
  25. &--custom {
  26. margin-left: 1px !important;
  27. left: 5px;
  28. top: 8px;
  29. border: 0;
  30. border-radius: 0;
  31. width: auto;
  32. height: auto;
  33. background-color: transparent;
  34. text-align: center;
  35. transform: translate(-50%, -50%);
  36. }
  37. }
  38. &__content {
  39. padding: 0 0 10px 20px;
  40. position: relative;
  41. top: -5px;
  42. width: 100%;
  43. box-sizing: border-box;
  44. }
  45. &--last &__tail,
  46. &--pending &__tail--pending {
  47. display: none;
  48. }
  49. &--last&--pending &__tail {
  50. display: block;
  51. border-left-style: dotted;
  52. }
  53. &--right &__tail {
  54. left: 100%;
  55. }
  56. &--right &__dot {
  57. left: 100%;
  58. margin-left: -5px;
  59. }
  60. &--right &__content {
  61. text-align: right;
  62. right: 0;
  63. left: -20px;
  64. }
  65. &--alternate&--right &__tail,
  66. &--alternate&--left &__tail {
  67. left: 50%;
  68. }
  69. &--alternate&--right &__dot,
  70. &--alternate&--left &__dot {
  71. left: 50%;
  72. margin-left: -5px;
  73. }
  74. &--alternate&--right &__content {
  75. text-align: right;
  76. right: 50%;
  77. width: 50%;
  78. }
  79. &--alternate&--left &__content {
  80. text-align: left;
  81. left: 50%;
  82. width: 50%;
  83. }
  84. }