info@53
|
1 |
//
|
info@53
|
2 |
// Modals
|
info@53
|
3 |
// --------------------------------------------------
|
info@53
|
4 |
|
info@53
|
5 |
// .modal-open - body class for killing the scroll
|
info@53
|
6 |
// .modal - container to scroll within
|
info@53
|
7 |
// .modal-dialog - positioning shell for the actual modal
|
info@53
|
8 |
// .modal-content - actual modal w/ bg and corners and shit
|
info@53
|
9 |
|
info@53
|
10 |
// Kill the scroll on the body
|
info@53
|
11 |
.modal-open {
|
info@53
|
12 |
overflow: hidden;
|
info@53
|
13 |
}
|
info@53
|
14 |
|
info@53
|
15 |
// Container that the modal scrolls within
|
info@53
|
16 |
.modal {
|
info@53
|
17 |
display: none;
|
info@53
|
18 |
overflow: auto;
|
info@53
|
19 |
overflow-y: scroll;
|
info@53
|
20 |
position: fixed;
|
info@53
|
21 |
top: 0;
|
info@53
|
22 |
right: 0;
|
info@53
|
23 |
bottom: 0;
|
info@53
|
24 |
left: 0;
|
info@53
|
25 |
z-index: @zindex-modal-background;
|
info@53
|
26 |
|
info@53
|
27 |
// When fading in the modal, animate it to slide down
|
info@53
|
28 |
&.fade .modal-dialog {
|
info@53
|
29 |
.translate(0, -25%);
|
info@53
|
30 |
.transition-transform(~"0.3s ease-out");
|
info@53
|
31 |
}
|
info@53
|
32 |
&.in .modal-dialog { .translate(0, 0)}
|
info@53
|
33 |
}
|
info@53
|
34 |
|
info@53
|
35 |
// Shell div to position the modal with bottom padding
|
info@53
|
36 |
.modal-dialog {
|
info@53
|
37 |
position: relative;
|
info@53
|
38 |
width: auto;
|
info@53
|
39 |
margin: 10px;
|
info@53
|
40 |
z-index: (@zindex-modal-background + 10);
|
info@53
|
41 |
}
|
info@53
|
42 |
|
info@53
|
43 |
// Actual modal
|
info@53
|
44 |
.modal-content {
|
info@53
|
45 |
position: relative;
|
info@53
|
46 |
background-color: @modal-content-bg;
|
info@53
|
47 |
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
|
info@53
|
48 |
border: 1px solid @modal-content-border-color;
|
info@53
|
49 |
border-radius: @border-radius-large;
|
info@53
|
50 |
.box-shadow(0 3px 9px rgba(0,0,0,.5));
|
info@53
|
51 |
background-clip: padding-box;
|
info@53
|
52 |
// Remove focus outline from opened modal
|
info@53
|
53 |
outline: none;
|
info@53
|
54 |
}
|
info@53
|
55 |
|
info@53
|
56 |
// Modal background
|
info@53
|
57 |
.modal-backdrop {
|
info@53
|
58 |
position: fixed;
|
info@53
|
59 |
top: 0;
|
info@53
|
60 |
right: 0;
|
info@53
|
61 |
bottom: 0;
|
info@53
|
62 |
left: 0;
|
info@53
|
63 |
z-index: (@zindex-modal-background - 10);
|
info@53
|
64 |
background-color: @modal-backdrop-bg;
|
info@53
|
65 |
// Fade for backdrop
|
info@53
|
66 |
&.fade { .opacity(0); }
|
info@53
|
67 |
&.in { .opacity(.5); }
|
info@53
|
68 |
}
|
info@53
|
69 |
|
info@53
|
70 |
// Modal header
|
info@53
|
71 |
// Top section of the modal w/ title and dismiss
|
info@53
|
72 |
.modal-header {
|
info@53
|
73 |
padding: @modal-title-padding;
|
info@53
|
74 |
border-bottom: 1px solid @modal-header-border-color;
|
info@53
|
75 |
min-height: (@modal-title-padding + @modal-title-line-height);
|
info@53
|
76 |
}
|
info@53
|
77 |
// Close icon
|
info@53
|
78 |
.modal-header .close {
|
info@53
|
79 |
margin-top: -2px;
|
info@53
|
80 |
}
|
info@53
|
81 |
|
info@53
|
82 |
// Title text within header
|
info@53
|
83 |
.modal-title {
|
info@53
|
84 |
margin: 0;
|
info@53
|
85 |
line-height: @modal-title-line-height;
|
info@53
|
86 |
}
|
info@53
|
87 |
|
info@53
|
88 |
// Modal body
|
info@53
|
89 |
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
info@53
|
90 |
.modal-body {
|
info@53
|
91 |
position: relative;
|
info@53
|
92 |
padding: @modal-inner-padding;
|
info@53
|
93 |
}
|
info@53
|
94 |
|
info@53
|
95 |
// Footer (for actions)
|
info@53
|
96 |
.modal-footer {
|
info@53
|
97 |
margin-top: 15px;
|
info@53
|
98 |
padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
|
info@53
|
99 |
text-align: right; // right align buttons
|
info@53
|
100 |
border-top: 1px solid @modal-footer-border-color;
|
info@53
|
101 |
.clearfix(); // clear it in case folks use .pull-* classes on buttons
|
info@53
|
102 |
|
info@53
|
103 |
// Properly space out buttons
|
info@53
|
104 |
.btn + .btn {
|
info@53
|
105 |
margin-left: 5px;
|
info@53
|
106 |
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
info@53
|
107 |
}
|
info@53
|
108 |
// but override that for button groups
|
info@53
|
109 |
.btn-group .btn + .btn {
|
info@53
|
110 |
margin-left: -1px;
|
info@53
|
111 |
}
|
info@53
|
112 |
// and override it for block buttons as well
|
info@53
|
113 |
.btn-block + .btn-block {
|
info@53
|
114 |
margin-left: 0;
|
info@53
|
115 |
}
|
info@53
|
116 |
}
|
info@53
|
117 |
|
info@53
|
118 |
// Scale up the modal
|
info@53
|
119 |
@media screen and (min-width: @screen-sm-min) {
|
info@53
|
120 |
|
info@53
|
121 |
.modal-dialog {
|
info@53
|
122 |
width: 600px;
|
info@53
|
123 |
margin: 30px auto;
|
info@53
|
124 |
}
|
info@53
|
125 |
.modal-content {
|
info@53
|
126 |
.box-shadow(0 5px 15px rgba(0,0,0,.5));
|
info@53
|
127 |
}
|
info@53
|
128 |
|
info@53
|
129 |
}
|