_modal.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. .modal {
  2. &:focus {
  3. outline: none;
  4. }
  5. @extend .z-depth-5;
  6. display: none;
  7. position: fixed;
  8. left: 0;
  9. right: 0;
  10. background-color: #fafafa;
  11. padding: 0;
  12. max-height: 70%;
  13. width: 55%;
  14. margin: auto;
  15. overflow-y: auto;
  16. border-radius: 2px;
  17. will-change: top, opacity;
  18. @media #{$medium-and-down} {
  19. width: 80%;
  20. }
  21. h1,h2,h3,h4 {
  22. margin-top: 0;
  23. }
  24. .modal-content {
  25. padding: 24px;
  26. }
  27. .modal-close {
  28. cursor: pointer;
  29. }
  30. .modal-footer {
  31. border-radius: 0 0 2px 2px;
  32. background-color: #fafafa;
  33. padding: 4px 6px;
  34. height: 56px;
  35. width: 100%;
  36. text-align: right;
  37. .btn, .btn-flat {
  38. margin: 6px 0;
  39. }
  40. }
  41. }
  42. .modal-overlay {
  43. position: fixed;
  44. z-index: 999;
  45. top: -25%;
  46. left: 0;
  47. bottom: 0;
  48. right: 0;
  49. height: 125%;
  50. width: 100%;
  51. background: #000;
  52. display: none;
  53. will-change: opacity;
  54. }
  55. // Modal with fixed action footer
  56. .modal.modal-fixed-footer {
  57. padding: 0;
  58. height: 70%;
  59. .modal-content {
  60. position: absolute;
  61. height: calc(100% - 56px);
  62. max-height: 100%;
  63. width: 100%;
  64. overflow-y: auto;
  65. }
  66. .modal-footer {
  67. border-top: 1px solid rgba(0,0,0,.1);
  68. position: absolute;
  69. bottom: 0;
  70. }
  71. }
  72. // Modal Bottom Sheet Style
  73. .modal.bottom-sheet {
  74. top: auto;
  75. bottom: -100%;
  76. margin: 0;
  77. width: 100%;
  78. max-height: 45%;
  79. border-radius: 0;
  80. will-change: bottom, opacity;
  81. }