_modal.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /**
  2. * Modals
  3. * --------------------------------------------------
  4. * Modals are independent windows that slide in from off-screen.
  5. */
  6. .modal-backdrop,
  7. .modal-backdrop-bg {
  8. position: fixed;
  9. top: 0;
  10. left: 0;
  11. z-index: $z-index-modal;
  12. width: 100%;
  13. height: 100%;
  14. }
  15. .modal-backdrop-bg {
  16. pointer-events: none;
  17. }
  18. .modal {
  19. display: block;
  20. position: absolute;
  21. top: 0;
  22. z-index: $z-index-modal;
  23. overflow: hidden;
  24. min-height: 100%;
  25. width: 100%;
  26. background-color: $modal-bg-color;
  27. }
  28. @media (min-width: $modal-inset-mode-break-point) {
  29. // inset mode is when the modal doesn't fill the entire
  30. // display but instead is centered within a large display
  31. .modal {
  32. top: $modal-inset-mode-top;
  33. right: $modal-inset-mode-right;
  34. bottom: $modal-inset-mode-bottom;
  35. left: $modal-inset-mode-left;
  36. min-height: $modal-inset-mode-min-height;
  37. width: (100% - $modal-inset-mode-left - $modal-inset-mode-right);
  38. }
  39. .modal.ng-leave-active {
  40. bottom: 0;
  41. }
  42. // remove ios header padding from inset header
  43. .platform-ios.platform-cordova .modal-wrapper .modal {
  44. .bar-header:not(.bar-subheader) {
  45. height: $bar-height;
  46. > * {
  47. margin-top: 0;
  48. }
  49. }
  50. .tabs-top > .tabs,
  51. .tabs.tabs-top {
  52. top: $bar-height;
  53. }
  54. .has-header,
  55. .bar-subheader {
  56. top: $bar-height;
  57. }
  58. .has-subheader {
  59. top: $bar-height + $bar-subheader-height;
  60. }
  61. .has-header.has-tabs-top {
  62. top: $bar-height + $tabs-height;
  63. }
  64. .has-header.has-subheader.has-tabs-top {
  65. top: $bar-height + $bar-subheader-height + $tabs-height;
  66. }
  67. }
  68. .modal-backdrop-bg {
  69. @include transition(opacity 300ms ease-in-out);
  70. background-color: $modal-backdrop-bg-active;
  71. opacity: 0;
  72. }
  73. .active .modal-backdrop-bg {
  74. opacity: 0.5;
  75. }
  76. }
  77. // disable clicks on all but the modal
  78. .modal-open {
  79. pointer-events: none;
  80. .modal,
  81. .modal-backdrop {
  82. pointer-events: auto;
  83. }
  84. // prevent clicks on modal when loading overlay is active though
  85. &.loading-active {
  86. .modal,
  87. .modal-backdrop {
  88. pointer-events: none;
  89. }
  90. }
  91. }