5 The humble modal hides off-canvas until summoned with an fa-open directive. Modals appear over an overlay that darkens the rest of the page, and have a maxmimum width. You can construct a grid inside a modal, or attach panels to it.
7 Note that the modal overlay is hardcoded into the CSS, because whether or not you build your modal semantically, the overlay is always required and will always look the same.
10 /// @Foundation.settings
12 $modal-background: #fff !default;
13 $modal-border: 0 !default;
14 $modal-radius: 0px !default;
15 $modal-shadow: none !default;
16 $modal-zindex: 1000 !default;
24 $modal-overlay-class: 'modal-overlay' !default;
25 $modal-overlay-background: rgba(#333, 0.7) !default;
30 z-index: $modal-zindex + 1;
31 background: $modal-background;
37 padding: $global-padding;
39 @include breakpoint(medium) {
41 max-width: map-get($modal-sizes, medium);
44 .grid-content, .grid-block {
48 .close-button, [fa-close] {
49 z-index: $modal-zindex + 1;
53 @mixin modal-dialog() {
57 $width: map-get($modal-sizes, medium),
63 $border: $modal-border,
64 $radius: $modal-radius,
65 $shadow: $modal-shadow
71 border-radius: $radius;
79 $width: map-get($modal-sizes, medium),
80 $border: $modal-border,
81 $radius: $modal-radius,
82 $shadow: $modal-shadow
85 @include modal-layout($width);
86 @include modal-style($border, $radius, $shadow);
89 @include exports(modal) {
93 @each $size in map-keys($modal-sizes) {
94 $width: map-get($modal-sizes, $size);
96 .#{$size} > & { @include modal-layout($width); }
101 @include modal-dialog;
108 .#{$modal-overlay-class} {
114 z-index: $modal-zindex;
116 background-color: $modal-overlay-background;
118 // Horizontally and vertically center the modal
120 justify-content: center;