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