popover.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. @import '../tooltip/variables.scss';
  2. @import "./animation.scss";
  3. @import './variables.scss';
  4. $module: #{$prefix}-popover;
  5. $module-icon: #{$module}-icon-arrow;
  6. @keyframes #{$module}-zoomIn {
  7. from {
  8. opacity: $motion-zoom_opacity-from;
  9. transform: scale($motion-zoom_scale-from, $motion-zoom_scale-from);
  10. }
  11. 50% {
  12. opacity: $motion-zoom_opacity-to;
  13. }
  14. }
  15. @keyframes #{$module}-zoomOut {
  16. from {
  17. opacity: $motion-zoom_opacity-to;
  18. }
  19. 60% {
  20. opacity: $motion-zoom_opacity-from;
  21. transform: scale($motion-zoom_scale-from, $motion-zoom_scale-from);
  22. }
  23. to {
  24. opacity: $motion-zoom_opacity-from;
  25. }
  26. }
  27. .#{$module} {
  28. &-wrapper {
  29. position: relative;
  30. // position: absolute;
  31. background-color: $color-popover-bg-default;
  32. // background-color: transparent;
  33. @include shadow-elevated;
  34. // box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.1);
  35. z-index: $z-popover;
  36. border-radius: $radius-popover;
  37. // padding: $spacing-extra-tight $spacing-tight;
  38. @include font-size-regular;
  39. opacity: 0;
  40. &-show {
  41. opacity: 1;
  42. }
  43. }
  44. &-trigger {
  45. display: inline-block;
  46. width: auto;
  47. height: auto;
  48. }
  49. &-title {
  50. padding: $spacing-popover_title-padding;
  51. border-bottom: $width-popover_title-border solid $color-popover-border-default;
  52. }
  53. // &-content {
  54. // padding: 20px;
  55. // }
  56. &-confirm {
  57. position: absolute;
  58. }
  59. &-with-arrow {
  60. padding: $spacing-popover_withArrow-padding;
  61. box-sizing: border-box;
  62. }
  63. &-animation-show{
  64. animation: #{$module}-zoomIn $animation_duration-popover-in $animation_function-popover-in;
  65. }
  66. &-animation-hide{
  67. animation: #{$module}-zoomOut $animation_duration-popover-out $animation_function-popover-out;
  68. }
  69. }
  70. @import '../tooltip/arrow.scss';
  71. @import "./rtl.scss";