label-placement.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. const genStepsLabelPlacementStyle = token => {
  2. const {
  3. componentCls,
  4. stepsIconSize,
  5. lineHeight,
  6. stepsSmallIconSize
  7. } = token;
  8. return {
  9. [`&${componentCls}-label-vertical`]: {
  10. [`${componentCls}-item`]: {
  11. overflow: 'visible',
  12. '&-tail': {
  13. marginInlineStart: stepsIconSize / 2 + token.controlHeightLG,
  14. padding: `${token.paddingXXS}px ${token.paddingLG}px`
  15. },
  16. '&-content': {
  17. display: 'block',
  18. width: (stepsIconSize / 2 + token.controlHeightLG) * 2,
  19. marginTop: token.marginSM,
  20. textAlign: 'center'
  21. },
  22. '&-icon': {
  23. display: 'inline-block',
  24. marginInlineStart: token.controlHeightLG
  25. },
  26. '&-title': {
  27. paddingInlineEnd: 0,
  28. paddingInlineStart: 0,
  29. '&::after': {
  30. display: 'none'
  31. }
  32. },
  33. '&-subtitle': {
  34. display: 'block',
  35. marginBottom: token.marginXXS,
  36. marginInlineStart: 0,
  37. lineHeight
  38. }
  39. },
  40. [`&${componentCls}-small:not(${componentCls}-dot)`]: {
  41. [`${componentCls}-item`]: {
  42. '&-icon': {
  43. marginInlineStart: token.controlHeightLG + (stepsIconSize - stepsSmallIconSize) / 2
  44. }
  45. }
  46. }
  47. }
  48. };
  49. };
  50. export default genStepsLabelPlacementStyle;