Welcome to mirror list, hosted at ThFree Co, Russian Federation.

popovers.css « css « lib - github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9d17556083ff19aa1c1bf91c578914af35ebc07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* Popovers (to be used with popovers.js)
-------------------------------------------------- */

.popover {
  position: fixed;
  top: 55px;
  left: 50%;
  z-index: 20;
  display: none;
  width: 280px;
  padding: 5px;
  margin-left: -146px;
  background-color: #555;
  background-image: -webkit-linear-gradient(top, #555 5%, #555 6%, #111 30%);
  background-image: linear-gradient(to bottom, #555 5%, #555 6%,#111 30%);
  border: 1px solid #111;
  border-radius: 6px;
  opacity: 0;
  box-shadow: inset 0 1px 1px -1px #fff, 0 3px 10px rgba(0, 0, 0, .3);
  -webkit-transform: translate3d(0, -15px, 0);
          transform: translate3d(0, -15px, 0);
  -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
                  transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

/* Caret on top of popover using CSS triangles (thanks to @chriscoyier for solution) */
.popover:before,
.popover:after {
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  content: '';
}
.popover:before {
  top: -20px;
  margin-left: -21px;
  border-right: 21px solid transparent;
  border-bottom: 21px solid #111;
  border-left: 21px solid transparent;
}
.popover:after {
  top: -19px;
  margin-left: -20px;
  border-right: 20px solid transparent;
  border-bottom: 20px solid #555;
  border-left: 20px solid transparent;
}

/* Wrapper for a title and buttons */
.popover-header {
  display: -webkit-box;
  display: box;
  height: 34px;
  margin-bottom: 5px;
}

/* Centered title for popover */
.popover-header .title {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 15px 0;
  font-size: 16px;
  font-weight: bold;
  line-height: 12px;
  color: #fff;
  text-align: center;
  text-shadow: 0 -1px rgba(0, 0, 0, .5);
}

/* Generic style for all buttons in .popover-header */
.popover-header [class*="button"] {
  z-index: 25;
  font-size: 12px;
  line-height: 22px;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
  background-color: #454545;
  background-image: -webkit-linear-gradient(top, #454545 0, #353535 100%);
  background-image: linear-gradient(to bottom, #454545 0, #353535 100%);
  border: 1px solid #111;
  -webkit-box-flex: 0;
          box-flex: 0;
}

/* Hacky way to right align buttons outside of flex-box system
   Note: is only absolutely positioned button, would be better if flex-box had an "align right" option */
.popover-header .title + [class*="button"]:last-child,
.popover-header .button + [class*="button"]:last-child,
.popover-header [class*="button"].pull-right {
  position: absolute;
  top: 5px;
  right: 5px;
}

/* Active state for popover header buttons */
.popover-header .button:active {
  color: #fff;
  background-color: #0876b1;
}

/* Popover animation
-------------------------------------------------- */

.popover.visible {
  opacity: 1;
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}

/* Backdrop (used as invisible touch escape)
-------------------------------------------------- */

.backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
}

/* Block level buttons in popovers
-------------------------------------------------- */

/* Positioning and giving darker border to look sharp against dark popover */
.popover .button-block {
  margin-bottom: 5px;
  border: 1px solid #111;
}

/* Remove extra margin on bottom of last button */
.popover .button-block:last-child {
  margin-bottom: 0;
}

/* Lists in popovers
-------------------------------------------------- */

.popover .list {
  width: auto;
  max-height: 250px;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  overflow: auto;
  background-color: #fff;
  border: 1px solid #000;
  border-radius: 3px;
  -webkit-overflow-scrolling: touch;
}