horizontal.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _cssinjs = require("@ant-design/cssinjs");
  7. const getHorizontalStyle = token => {
  8. const {
  9. componentCls,
  10. motionDurationSlow,
  11. horizontalLineHeight,
  12. colorSplit,
  13. lineWidth,
  14. lineType,
  15. itemPaddingInline
  16. } = token;
  17. return {
  18. [`${componentCls}-horizontal`]: {
  19. lineHeight: horizontalLineHeight,
  20. border: 0,
  21. borderBottom: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  22. boxShadow: 'none',
  23. '&::after': {
  24. display: 'block',
  25. clear: 'both',
  26. height: 0,
  27. content: '"\\20"'
  28. },
  29. // ======================= Item =======================
  30. [`${componentCls}-item, ${componentCls}-submenu`]: {
  31. position: 'relative',
  32. display: 'inline-block',
  33. verticalAlign: 'bottom',
  34. paddingInline: itemPaddingInline
  35. },
  36. [`> ${componentCls}-item:hover,
  37. > ${componentCls}-item-active,
  38. > ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
  39. backgroundColor: 'transparent'
  40. },
  41. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  42. transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(',')
  43. },
  44. // ===================== Sub Menu =====================
  45. [`${componentCls}-submenu-arrow`]: {
  46. display: 'none'
  47. }
  48. }
  49. };
  50. };
  51. var _default = exports.default = getHorizontalStyle;