Mercurial > wikked
annotate static/bootstrap/less/modals.less @ 74:3c8e07af93c7
Added FontAwesome icons.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 27 Feb 2013 22:02:02 -0800 |
parents | 130eccd396d8 |
children | d29e2f337b00 |
rev | line source |
---|---|
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 // |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 // Modals |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 // -------------------------------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 // Background |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 .modal-backdrop { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 position: fixed; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 top: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 right: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 bottom: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 left: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 z-index: @zindexModalBackdrop; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 background-color: @black; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 // Fade for backdrop |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 &.fade { opacity: 0; } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
18 .modal-backdrop, |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
19 .modal-backdrop.fade.in { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
20 .opacity(80); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
21 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
22 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
23 // Base modal |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
24 .modal { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
25 position: fixed; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
26 top: 10%; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
27 left: 50%; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
28 z-index: @zindexModal; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
29 width: 560px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
30 margin-left: -280px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
31 background-color: @white; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
32 border: 1px solid #999; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
33 border: 1px solid rgba(0,0,0,.3); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
34 *border: 1px solid #999; /* IE6-7 */ |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
35 .border-radius(6px); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
36 .box-shadow(0 3px 7px rgba(0,0,0,0.3)); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
37 .background-clip(padding-box); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
38 // Remove focus outline from opened modal |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
39 outline: none; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
40 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
41 &.fade { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
42 .transition(e('opacity .3s linear, top .3s ease-out')); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
43 top: -25%; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
44 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
45 &.fade.in { top: 10%; } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
46 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
47 .modal-header { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
48 padding: 9px 15px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
49 border-bottom: 1px solid #eee; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
50 // Close icon |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
51 .close { margin-top: 2px; } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
52 // Heading |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
53 h3 { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
54 margin: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
55 line-height: 30px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
56 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
57 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
58 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
59 // Body (where all modal content resides) |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
60 .modal-body { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
61 position: relative; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
62 overflow-y: auto; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
63 max-height: 400px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
64 padding: 15px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
65 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
66 // Remove bottom margin if need be |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
67 .modal-form { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
68 margin-bottom: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
69 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
70 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
71 // Footer (for actions) |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
72 .modal-footer { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
73 padding: 14px 15px 15px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
74 margin-bottom: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
75 text-align: right; // right align buttons |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
76 background-color: #f5f5f5; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
77 border-top: 1px solid #ddd; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
78 .border-radius(0 0 6px 6px); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
79 .box-shadow(inset 0 1px 0 @white); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
80 .clearfix(); // clear it in case folks use .pull-* classes on buttons |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
81 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
82 // Properly space out buttons |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
83 .btn + .btn { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
84 margin-left: 5px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
85 margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
86 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
87 // but override that for button groups |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
88 .btn-group .btn + .btn { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
89 margin-left: -1px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
90 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
91 // and override it for block buttons as well |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
92 .btn-block + .btn-block { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
93 margin-left: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
94 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
95 } |