blob: 3132934e37fb3b7b356654ba77e8c77be59a4b03 [file] [log] [blame]
Michael Davis9486f542017-05-30 15:35:31 -05001.modal-overlay {
beccabroekd0dbe3b2019-03-11 15:02:25 -05002 width: 100%;
3 height: 100%;
4 z-index: -1;
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -05005 background-color: $primary-dark;
beccabroekd0dbe3b2019-03-11 15:02:25 -05006 position: fixed;
7 top: 0;
8 left: 0;
9 margin: 0;
10 padding: 0;
Iftekharul Islamec6bcd12017-09-06 10:49:07 -050011 opacity: 0;
Michael Davis9486f542017-05-30 15:35:31 -050012}
13
Derick Montague30d7c632019-07-31 22:35:48 -050014.modal-overlay.active {
beccabroekd0dbe3b2019-03-11 15:02:25 -050015 z-index: 100;
Derick Montague30d7c632019-07-31 22:35:48 -050016 opacity: 0.5;
Iftekharul Islamec6bcd12017-09-06 10:49:07 -050017 display: block;
Michael Davis98e66602017-08-28 18:37:52 -050018 @include fastTransition-all;
Iftekharul Islamc0161392017-06-14 15:46:15 -050019}
20
Yoshie Muranakae4194ce2019-05-24 14:33:56 -050021.modal:not(.uib-modal) {
beccabroekd0dbe3b2019-03-11 15:02:25 -050022 width: auto;
miramurali235e8785d2019-06-10 15:09:27 -050023 min-width: 450px;
24 max-width: 960px;
beccabroekd0dbe3b2019-03-11 15:02:25 -050025 height: auto;
26 left: 50%;
27 top: 50%;
Derick Montague30d7c632019-07-31 22:35:48 -050028 transform: translate(-50%, -50%);
Michael Davis9486f542017-05-30 15:35:31 -050029 max-width: 850px;
beccabroekd0dbe3b2019-03-11 15:02:25 -050030 min-width: 450px;
Derick Montague30d7c632019-07-31 22:35:48 -050031 padding: 0.8em 1.5em;
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -050032 border: thin $primary-dark solid;
Derick Montague30d7c632019-07-31 22:35:48 -050033 background-color: $background-01;
beccabroekd0dbe3b2019-03-11 15:02:25 -050034 z-index: 101;
35 position: fixed;
Michael Davis9486f542017-05-30 15:35:31 -050036 overflow: hidden;
Michael Davis9486f542017-05-30 15:35:31 -050037 @include fastTransition-all;
38 @include mediaQuery(medium) {
39 padding: 2.5em;
40 }
41}
42
Derick Montague30d7c632019-07-31 22:35:48 -050043.modal.active {
Michael Davis98e66602017-08-28 18:37:52 -050044 @include fastTransition-all;
Gunnar Mills25fdeb82018-02-21 13:42:04 -060045 display: block;
Iftekharul Islamc0161392017-06-14 15:46:15 -050046}
47
Michael Davis9486f542017-05-30 15:35:31 -050048.modal .page-header {
Derick Montague30d7c632019-07-31 22:35:48 -050049 padding-bottom: 0.7em;
Michael Davis9486f542017-05-30 15:35:31 -050050}
51
52.screen-reader-offscreen {
beccabroekd0dbe3b2019-03-11 15:02:25 -050053 position: absolute;
54 left: -999px;
55 width: 1px;
56 height: 1px;
57 top: auto;
Michael Davis9486f542017-05-30 15:35:31 -050058}
59.modal__content {
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -050060 border-bottom: 1px solid $border-color-02;
Michael Davis9486f542017-05-30 15:35:31 -050061 padding-bottom: 1em;
62 margin-bottom: 2em;
63}
64.modal__link {
65 display: block;
Derick Montague30d7c632019-07-31 22:35:48 -050066 margin: 0.8em 0 1em;
Michael Davis9486f542017-05-30 15:35:31 -050067 @include mediaQuery(medium) {
68 display: inline-block;
Derick Montague30d7c632019-07-31 22:35:48 -050069 margin: 0.6em 0;
Michael Davis9486f542017-05-30 15:35:31 -050070 }
71}
Derick Montague30d7c632019-07-31 22:35:48 -050072// TODO: Use the form__actions pattern / selector
Michael Davis9486f542017-05-30 15:35:31 -050073.modal__button-wrapper {
74 float: right;
75 button {
Derick Montague30d7c632019-07-31 22:35:48 -050076 margin-bottom: 0.8em;
77 margin-right: 0.8em;
Michael Davis9486f542017-05-30 15:35:31 -050078 display: inline-block;
79 @include mediaQuery(medium) {
Derick Montague30d7c632019-07-31 22:35:48 -050080 margin-left: 0.8em;
Michael Davis9486f542017-05-30 15:35:31 -050081 margin-right: 0;
82 }
83 }
Gunnar Mills25fdeb82018-02-21 13:42:04 -060084}
Yoshie Muranakae4194ce2019-05-24 14:33:56 -050085
Dixsie Wolmersc15f66b2019-09-11 15:26:38 -050086/**
87 * Markup for bootstrap modal
88 <div class="uib-modal__content">
89 <div class="modal-header">
90 <h2 class="modal-title" id="modal_label">
91 Title here
92 </h2>
93 <button
94 type="button"
95 class="btn btn--close"
96 ng-click="$dismiss()"
97 aria-label="close">
98 <icon file="icon-close.svg" aria-hidden="true"></icon>
99 </button>
100 </div>
101 <div class="modal-body">
102 Body content
103 </div>
104 <div class="modal-footer">
105 <button
106 type="button"
107 class="btn btn-secondary"
108 ng-click="$dismiss()">
109 Cancel
110 </button>
111 <button
112 type="submit"
113 class="btn btn-primary"
114 ng-click="function()">
115 Save
116 </button>
117 </div>
118 </div>
119*/
120
Yoshie Muranakae4194ce2019-05-24 14:33:56 -0500121.uib-modal.fade.in {
122 opacity: 1;
123}
Dixsie Wolmersc15f66b2019-09-11 15:26:38 -0500124
Yoshie Muranakae4194ce2019-05-24 14:33:56 -0500125.uib-modal.in .modal-dialog {
126 transform: translate(0, 10vh);
127 margin-top: 50px;
128 .icon__close {
129 margin: 0;
130 padding: 0;
131 }
132 .modal-content {
133 border-radius: 0;
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -0500134 border-color: $primary-dark;
Yoshie Muranakae4194ce2019-05-24 14:33:56 -0500135 }
136}
137
138.modal-backdrop.in {
139 opacity: 0.5;
140}
Dixsie Wolmersc15f66b2019-09-11 15:26:38 -0500141
Yoshie Muranakae4194ce2019-05-24 14:33:56 -0500142.uib-modal__content {
143 padding: 1em;
Dixsie Wolmerse3681082019-06-21 13:48:06 -0500144 .modal-header {
145 display: block;
146 }
147 .btn--close {
148 padding: 0;
149 svg {
150 height: 1.6em;
151 }
152 }
Yoshie Muranakae4194ce2019-05-24 14:33:56 -0500153}
Yoshie Muranakafa562732019-07-17 11:23:15 -0500154
155.uib-modal {
156 .btn--close {
157 position: absolute;
158 right: 0;
159 top: 0;
160 svg {
161 height: 2em;
162 }
163 }
Dixsie Wolmerse3681082019-06-21 13:48:06 -0500164}