tooltip.scss 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //@import '../theme/variables.scss';
  2. @import './variables.scss';
  3. $module: #{$prefix}-tooltip;
  4. $module-icon: #{$module}-icon-arrow;
  5. @keyframes #{$module}-zoomIn {
  6. from {
  7. opacity: $motion-zoom_opacity-from;
  8. transform: scale($motion-zoom_scale-from, $motion-zoom_scale-from);
  9. }
  10. 50% {
  11. opacity: $motion-zoom_opacity-to;
  12. }
  13. }
  14. @keyframes #{$module}-bounceIn {
  15. from {
  16. opacity: 0;
  17. transform: scale(0.6, 0.6);
  18. }
  19. 70% {
  20. opacity: 1;
  21. transform: scale(1.01, 1.01);
  22. }
  23. to {
  24. opacity: 1;
  25. transform: scale(1, 1);
  26. animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  27. }
  28. }
  29. @keyframes #{$module}-zoomOut {
  30. from {
  31. opacity: $motion-zoom_opacity-to;
  32. }
  33. 60% {
  34. opacity: $motion-zoom_opacity-from;
  35. transform: scale($motion-zoom_scale-from, $motion-zoom_scale-from);
  36. }
  37. to {
  38. opacity: $motion-zoom_opacity-from;
  39. }
  40. }
  41. .#{$module} {
  42. &-wrapper {
  43. position: relative;
  44. background-color: $color-tooltip-bg-default;
  45. color: $color-tooltip-text-default;
  46. // z-index: $z-tooltip; // TODO z-index定义需要收敛
  47. border-radius: $radius-tooltip;
  48. padding-top: $spacing-tooltip_content-paddingTop;
  49. padding-right: $spacing-tooltip_content-paddingRight;
  50. padding-bottom: $spacing-tooltip_content-paddingBottom;
  51. padding-left: $spacing-tooltip_content-paddingLeft;
  52. font-size: $font-tooltip-fontSize;
  53. left: 0;
  54. top: 0;
  55. @include font-size-regular;
  56. visibility: hidden;
  57. max-width: $width-tooltip;
  58. &-show {
  59. visibility: visible;
  60. }
  61. }
  62. &-trigger {
  63. display: inline-block;
  64. width: auto;
  65. height: auto;
  66. }
  67. &-with-arrow {
  68. // padding: 12px;
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. box-sizing: border-box;
  73. }
  74. }
  75. @import './arrow.scss';
  76. @import './rtl.scss';