index.less 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. @import '../style/var';
  2. .van-divider {
  3. display: flex;
  4. align-items: center;
  5. margin: @divider-margin;
  6. color: @divider-text-color;
  7. font-size: @divider-font-size;
  8. line-height: @divider-line-height;
  9. border-color: @divider-border-color;
  10. border-style: solid;
  11. border-width: 0;
  12. &::before,
  13. &::after {
  14. display: block;
  15. flex: 1;
  16. box-sizing: border-box;
  17. height: 1px;
  18. border-color: inherit;
  19. border-style: inherit;
  20. border-width: @border-width-base 0 0;
  21. }
  22. &::before {
  23. content: '';
  24. }
  25. &--hairline {
  26. &::before,
  27. &::after {
  28. transform: scaleY(0.5);
  29. }
  30. }
  31. &--dashed {
  32. border-style: dashed;
  33. }
  34. &--content-center,
  35. &--content-left,
  36. &--content-right {
  37. &::before {
  38. margin-right: @divider-content-padding;
  39. }
  40. &::after {
  41. margin-left: @divider-content-padding;
  42. content: '';
  43. }
  44. }
  45. &--content-left {
  46. &::before {
  47. max-width: @divider-content-left-width;
  48. }
  49. }
  50. &--content-right {
  51. &::after {
  52. max-width: @divider-content-right-width;
  53. }
  54. }
  55. }