unignore bower_components
[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   &.fade.in  .modal-dialog { .translate(0, 0)}
33 }
34
35 // Shell div to position the modal with bottom padding
36 .modal-dialog {
37   position: relative;
38   top: 0;
39   left: 0;
40   right: 0;
41   width: auto;
42   padding: 10px;
43   z-index: (@zindex-modal-background + 10);
44 }
45
46 // Actual modal
47 .modal-content {
48   position: relative;
49   background-color: @modal-content-bg;
50   border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
51   border: 1px solid @modal-content-border-color;
52   border-radius: @border-radius-large;
53   .box-shadow(0 3px 9px rgba(0,0,0,.5));
54   .background-clip(padding-box);
55   // Remove focus outline from opened modal
56   outline: none;
57 }
58
59 // Modal background
60 .modal-backdrop {
61   position: fixed;
62   top: 0;
63   right: 0;
64   bottom: 0;
65   left: 0;
66   z-index: (@zindex-modal-background - 10);
67   background-color: @modal-backdrop-bg;
68   // Fade for backdrop
69   &.fade { .opacity(0); }
70   &.fade.in { .opacity(.5); }
71 }
72
73 // Modal header
74 // Top section of the modal w/ title and dismiss
75 .modal-header {
76   padding: @modal-title-padding;
77   border-bottom: 1px solid @modal-header-border-color;
78   min-height: (@modal-title-padding + @modal-title-line-height);
79 }
80 // Close icon
81 .modal-header .close {
82   margin-top: -2px;
83 }
84
85 // Title text within header
86 .modal-title {
87   margin: 0;
88   line-height: @modal-title-line-height;
89 }
90
91 // Modal body
92 // Where all modal content resides (sibling of .modal-header and .modal-footer)
93 .modal-body {
94   position: relative;
95   padding: @modal-inner-padding;
96 }
97
98 // Footer (for actions)
99 .modal-footer {
100   margin-top: 15px;
101   padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
102   text-align: right; // right align buttons
103   border-top: 1px solid @modal-footer-border-color;
104   .clearfix(); // clear it in case folks use .pull-* classes on buttons
105
106   // Properly space out buttons
107   .btn + .btn {
108     margin-left: 5px;
109     margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
110   }
111   // but override that for button groups
112   .btn-group .btn + .btn {
113     margin-left: -1px;
114   }
115   // and override it for block buttons as well
116   .btn-block + .btn-block {
117     margin-left: 0;
118   }
119 }
120
121 // Scale up the modal
122 @media screen and (min-width: @screen-tablet) {
123
124   .modal-dialog {
125     left: 50%;
126     right: auto;
127     width: 560px;
128     margin-left: -280px;
129     padding-top: 30px;
130     padding-bottom: 30px;
131   }
132   .modal-content {
133     .box-shadow(0 5px 15px rgba(0,0,0,.5));
134   }
135
136 }