modal.sass 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .modal-background
  2. +overlay
  3. background-color: rgba($black, 0.86)
  4. .modal-content
  5. margin: 0 20px
  6. max-height: calc(100vh - 160px)
  7. overflow: auto
  8. position: relative
  9. width: 100%
  10. // Responsiveness
  11. +tablet
  12. margin: 0 auto
  13. max-height: calc(100vh - 40px)
  14. width: 640px
  15. .modal-close
  16. @extend .delete
  17. background: none
  18. height: 40px
  19. position: fixed
  20. right: 20px
  21. top: 20px
  22. width: 40px
  23. .modal-card
  24. @extend .modal-content
  25. background-color: $white
  26. border-radius: $radius-large
  27. display: flex
  28. flex-direction: column
  29. max-height: calc(100vh - 40px)
  30. overflow: hidden
  31. .modal-card-head,
  32. .modal-card-foot
  33. align-items: center
  34. background-color: $background
  35. display: flex
  36. flex-shrink: 0
  37. justify-content: flex-start
  38. padding: 20px
  39. position: relative
  40. .modal-card-head
  41. border-bottom: 1px solid $border
  42. .modal-card-title
  43. color: $text-strong
  44. flex-grow: 1
  45. font-size: $size-4
  46. line-height: 1
  47. .modal-card-foot
  48. border-top: 1px solid $border
  49. .button
  50. &:not(:last-child)
  51. margin-right: 10px
  52. .modal-card-body
  53. flex-grow: 1
  54. overflow: auto
  55. padding: 20px
  56. .modal
  57. +overlay
  58. align-items: center
  59. display: none
  60. justify-content: center
  61. overflow: hidden
  62. position: fixed
  63. z-index: 1986
  64. // Modifiers
  65. &.is-active
  66. display: flex