_popovers.scss 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Popovers
  2. .popover {
  3. display: inline-block;
  4. position: relative;
  5. .popover-container {
  6. left: 50%;
  7. opacity: 0;
  8. padding: $layout-spacing;
  9. position: absolute;
  10. top: 0;
  11. transform: translate(-50%, -50%) scale(0);
  12. transition: transform .2s ease;
  13. width: $control-width-sm;
  14. z-index: $zindex-3;
  15. }
  16. *:focus + .popover-container,
  17. &:hover .popover-container,
  18. .popover-container:hover {
  19. display: block;
  20. opacity: 1;
  21. transform: translate(-50%, -100%) scale(1);
  22. }
  23. &.popover-right {
  24. .popover-container {
  25. left: 100%;
  26. top: 50%;
  27. }
  28. :focus + .popover-container,
  29. &:hover .popover-container,
  30. .popover-container:hover {
  31. transform: translate(0, -50%) scale(1);
  32. }
  33. }
  34. &.popover-bottom {
  35. .popover-container {
  36. left: 50%;
  37. top: 100%;
  38. }
  39. :focus + .popover-container,
  40. &:hover .popover-container,
  41. .popover-container:hover {
  42. transform: translate(-50%, 0) scale(1);
  43. }
  44. }
  45. &.popover-left {
  46. .popover-container {
  47. left: 0;
  48. top: 50%;
  49. }
  50. :focus + .popover-container,
  51. &:hover .popover-container,
  52. .popover-container:hover {
  53. transform: translate(-100%, -50%) scale(1);
  54. }
  55. }
  56. .card {
  57. @include shadow-variant(.2rem);
  58. border: 0;
  59. }
  60. }