bulma/sass/components/modal.sass

114 lines
2.8 KiB
Sass
Raw Normal View History

$modal-z: 40 !default
2017-07-28 20:05:15 +00:00
$modal-background-background-color: rgba($black, 0.86) !default
$modal-content-width: 640px !default
$modal-content-margin-mobile: 20px !default
$modal-content-spacing-mobile: 160px !default
$modal-content-spacing-tablet: 40px !default
$modal-close-dimensions: 40px !default
$modal-close-right: 20px !default
$modal-close-top: 20px !default
$modal-card-spacing: 40px !default
$modal-card-head-background-color: $background !default
$modal-card-head-border-bottom: 1px solid $border !default
$modal-card-head-padding: 20px !default
$modal-card-head-radius: $radius-large !default
$modal-card-title-color: $text-strong !default
$modal-card-title-line-height: 1 !default
$modal-card-title-size: $size-4 !default
$modal-card-foot-radius: $radius-large !default
$modal-card-foot-border-top: 1px solid $border !default
$modal-card-body-background-color: $white !default
$modal-card-body-padding: 20px !default
.modal
+overlay
align-items: center
display: none
flex-direction: column
2017-07-28 20:05:15 +00:00
justify-content: center
overflow: hidden
position: fixed
z-index: $modal-z
// Modifiers
&.is-active
display: flex
.modal-background
+overlay
2017-07-28 20:05:15 +00:00
background-color: $modal-background-background-color
2016-09-22 21:03:22 +00:00
.modal-content,
.modal-card
2017-07-28 20:05:15 +00:00
margin: 0 $modal-content-margin-mobile
max-height: calc(100vh - #{$modal-content-spacing-mobile})
overflow: auto
position: relative
width: 100%
2016-04-10 15:27:27 +00:00
// Responsiveness
+tablet
margin: 0 auto
2017-07-28 20:05:15 +00:00
max-height: calc(100vh - #{$modal-content-spacing-tablet})
width: $modal-content-width
.modal-close
2016-09-22 22:14:18 +00:00
+delete
background: none
2017-07-28 20:05:15 +00:00
height: $modal-close-dimensions
position: fixed
2017-07-28 20:05:15 +00:00
right: $modal-close-right
top: $modal-close-top
width: $modal-close-dimensions
.modal-card
display: flex
flex-direction: column
2017-07-28 20:05:15 +00:00
max-height: calc(100vh - #{$modal-card-spacing})
overflow: hidden
2018-06-01 12:17:53 +00:00
-ms-overflow-y: visible
.modal-card-head,
.modal-card-foot
align-items: center
2017-07-28 20:05:15 +00:00
background-color: $modal-card-head-background-color
display: flex
flex-shrink: 0
justify-content: flex-start
2017-07-28 20:05:15 +00:00
padding: $modal-card-head-padding
position: relative
.modal-card-head
2017-07-28 20:05:15 +00:00
border-bottom: $modal-card-head-border-bottom
border-top-left-radius: $modal-card-head-radius
border-top-right-radius: $modal-card-head-radius
.modal-card-title
2017-07-28 20:05:15 +00:00
color: $modal-card-title-color
2016-07-31 10:45:56 +00:00
flex-grow: 1
flex-shrink: 0
2017-07-28 20:05:15 +00:00
font-size: $modal-card-title-size
line-height: $modal-card-title-line-height
.modal-card-foot
2017-07-28 20:05:15 +00:00
border-bottom-left-radius: $modal-card-foot-radius
border-bottom-right-radius: $modal-card-foot-radius
border-top: $modal-card-foot-border-top
.button
&:not(:last-child)
margin-right: 10px
.modal-card-body
2016-12-22 19:51:52 +00:00
+overflow-touch
2017-07-28 20:05:15 +00:00
background-color: $modal-card-body-background-color
2016-07-31 10:45:56 +00:00
flex-grow: 1
flex-shrink: 1
overflow: auto
2017-07-28 20:05:15 +00:00
padding: $modal-card-body-padding