| 1 |
@import "../utilities/mixins" |
| 2 |
|
| 3 |
$modal-z: 40 !default |
| 4 |
|
| 5 |
$modal-background-background-color: bulmaRgba($scheme-invert, 0.86) !default |
| 6 |
|
| 7 |
$modal-content-width: 640px !default |
| 8 |
$modal-content-margin-mobile: 20px !default |
| 9 |
$modal-content-spacing-mobile: 160px !default |
| 10 |
$modal-content-spacing-tablet: 40px !default |
| 11 |
|
| 12 |
$modal-close-dimensions: 40px !default |
| 13 |
$modal-close-right: 20px !default |
| 14 |
$modal-close-top: 20px !default |
| 15 |
|
| 16 |
$modal-card-spacing: 40px !default |
| 17 |
|
| 18 |
$modal-card-head-background-color: $background !default |
| 19 |
$modal-card-head-border-bottom: 1px solid $border !default |
| 20 |
$modal-card-head-padding: 20px !default |
| 21 |
$modal-card-head-radius: $radius-large !default |
| 22 |
|
| 23 |
$modal-card-title-color: $text-strong !default |
| 24 |
$modal-card-title-line-height: 1 !default |
| 25 |
$modal-card-title-size: $size-4 !default |
| 26 |
|
| 27 |
$modal-card-foot-radius: $radius-large !default |
| 28 |
$modal-card-foot-border-top: 1px solid $border !default |
| 29 |
|
| 30 |
$modal-card-body-background-color: $scheme-main !default |
| 31 |
$modal-card-body-padding: 20px !default |
| 32 |
|
| 33 |
$modal-breakpoint: $tablet !default |
| 34 |
|
| 35 |
.modal |
| 36 |
@extend %overlay |
| 37 |
align-items: center |
| 38 |
display: none |
| 39 |
flex-direction: column |
| 40 |
justify-content: center |
| 41 |
overflow: hidden |
| 42 |
position: fixed |
| 43 |
z-index: $modal-z |
| 44 |
// Modifiers |
| 45 |
&.is-active |
| 46 |
display: flex |
| 47 |
|
| 48 |
.modal-background |
| 49 |
@extend %overlay |
| 50 |
background-color: $modal-background-background-color |
| 51 |
|
| 52 |
.modal-content, |
| 53 |
.modal-card |
| 54 |
margin: 0 $modal-content-margin-mobile |
| 55 |
max-height: calc(100vh - #{$modal-content-spacing-mobile}) |
| 56 |
overflow: auto |
| 57 |
position: relative |
| 58 |
width: 100% |
| 59 |
// Responsiveness |
| 60 |
+from($modal-breakpoint) |
| 61 |
margin: 0 auto |
| 62 |
max-height: calc(100vh - #{$modal-content-spacing-tablet}) |
| 63 |
width: $modal-content-width |
| 64 |
|
| 65 |
.modal-close |
| 66 |
@extend %delete |
| 67 |
background: none |
| 68 |
height: $modal-close-dimensions |
| 69 |
position: fixed |
| 70 |
+ltr-position($modal-close-right) |
| 71 |
top: $modal-close-top |
| 72 |
width: $modal-close-dimensions |
| 73 |
|
| 74 |
.modal-card |
| 75 |
display: flex |
| 76 |
flex-direction: column |
| 77 |
max-height: calc(100vh - #{$modal-card-spacing}) |
| 78 |
overflow: hidden |
| 79 |
-ms-overflow-y: visible |
| 80 |
|
| 81 |
.modal-card-head, |
| 82 |
.modal-card-foot |
| 83 |
align-items: center |
| 84 |
background-color: $modal-card-head-background-color |
| 85 |
display: flex |
| 86 |
flex-shrink: 0 |
| 87 |
justify-content: flex-start |
| 88 |
padding: $modal-card-head-padding |
| 89 |
position: relative |
| 90 |
|
| 91 |
.modal-card-head |
| 92 |
border-bottom: $modal-card-head-border-bottom |
| 93 |
border-top-left-radius: $modal-card-head-radius |
| 94 |
border-top-right-radius: $modal-card-head-radius |
| 95 |
|
| 96 |
.modal-card-title |
| 97 |
color: $modal-card-title-color |
| 98 |
flex-grow: 1 |
| 99 |
flex-shrink: 0 |
| 100 |
font-size: $modal-card-title-size |
| 101 |
line-height: $modal-card-title-line-height |
| 102 |
|
| 103 |
.modal-card-foot |
| 104 |
border-bottom-left-radius: $modal-card-foot-radius |
| 105 |
border-bottom-right-radius: $modal-card-foot-radius |
| 106 |
border-top: $modal-card-foot-border-top |
| 107 |
.button |
| 108 |
&:not(:last-child) |
| 109 |
+ltr-property("margin", 0.5em) |
| 110 |
|
| 111 |
.modal-card-body |
| 112 |
+overflow-touch |
| 113 |
background-color: $modal-card-body-background-color |
| 114 |
flex-grow: 1 |
| 115 |
flex-shrink: 1 |
| 116 |
overflow: auto |
| 117 |
padding: $modal-card-body-padding |