driver.scss 5.6 KB
Newer Older
B
Bastien 已提交
1 2 3 4 5
$text-color: #2d2d2d !default;
$popover-bg: #ffffff !default;
$stage-bg: #ffffff !default;
$button-bg: #f1f1f1 !default;
$disabled-btn-color: #808080 !default;
K
Kamran Ahmed 已提交
6

B
Bastien 已提交
7 8 9 10
$popover-z-index: 1000000000 !default;
$overlay-z-index: 100002 !default;
$stage-z-index: 100003 !default;
$highlighted-element-z-index: 100004 !default;
K
Kamran Ahmed 已提交
11

12
// Note: If you update this duration, make sure to
K
Kamran Ahmed 已提交
13
// update `ANIMATION_DURATION_MS` constant
14
$animation-ms: 300 !default;
B
Bastien 已提交
15
$animation-sec: ($animation-ms / 1000) * 1s !default;
K
Kamran Ahmed 已提交
16

K
Kamran Ahmed 已提交
17
div#driver-popover-item {
K
Kamran Ahmed 已提交
18
  display: none;
19
  position: absolute;
K
Kamran Ahmed 已提交
20 21
  background: $popover-bg;
  color: $text-color;
K
Kamran Ahmed 已提交
22 23 24 25 26 27
  margin: 0;
  padding: 15px;
  border-radius: 5px;
  min-width: 250px;
  max-width: 300px;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
28
  z-index: $popover-z-index;
K
Kamran Ahmed 已提交
29

K
Kamran Ahmed 已提交
30
  .driver-popover-tip {
K
Kamran Ahmed 已提交
31
    border: 5px solid $popover-bg;
K
Kamran Ahmed 已提交
32 33 34 35 36
    content: '';
    position: absolute;

    &.bottom {
      bottom: -10px;
K
Kamran Ahmed 已提交
37
      border-top-color: $popover-bg;
K
Kamran Ahmed 已提交
38 39 40
      border-right-color: transparent;
      border-bottom-color: transparent;
      border-left-color: transparent;
41 42 43 44 45 46 47 48

      &.position-center {
        left: 49%;
      }

      &.position-right {
        right: 20px;
      }
K
Kamran Ahmed 已提交
49 50 51 52 53 54
    }

    &.left {
      left: -10px;
      top: 10px;
      border-top-color: transparent;
K
Kamran Ahmed 已提交
55
      border-right-color: $popover-bg;
K
Kamran Ahmed 已提交
56 57
      border-bottom-color: transparent;
      border-left-color: transparent;
K
Kamran Ahmed 已提交
58 59 60 61 62 63 64 65 66

      &.position-center {
        top: 46%;
      }

      &.position-bottom {
        top: auto;
        bottom: 20px;
      }
K
Kamran Ahmed 已提交
67 68 69 70 71 72 73 74
    }

    &.right {
      right: -10px;
      top: 10px;
      border-top-color: transparent;
      border-right-color: transparent;
      border-bottom-color: transparent;
K
Kamran Ahmed 已提交
75
      border-left-color: $popover-bg;
76 77 78 79 80 81

      &.position-center {
        top: 46%;
      }

      &.position-bottom {
82
        top: auto;
83 84
        bottom: 20px;
      }
K
Kamran Ahmed 已提交
85 86 87 88 89 90
    }

    &.top {
      top: -10px;
      border-top-color: transparent;
      border-right-color: transparent;
K
Kamran Ahmed 已提交
91
      border-bottom-color: $popover-bg;
K
Kamran Ahmed 已提交
92
      border-left-color: transparent;
K
Kamran Ahmed 已提交
93

94 95 96
      &.position-center {
        left: 49%;
      }
K
Kamran Ahmed 已提交
97

98 99 100
      &.position-right {
        right: 20px;
      }
K
Kamran Ahmed 已提交
101
    }
102 103 104 105

    &.mid-center {
      display: none;
    }
K
Kamran Ahmed 已提交
106 107
  }

K
Kamran Ahmed 已提交
108
  .driver-popover-footer {
K
Kamran Ahmed 已提交
109
    display: block;
110
    margin-top: 10px;
K
Kamran Ahmed 已提交
111

112
    button {
K
Kamran Ahmed 已提交
113 114 115 116 117
      display: inline-block;
      padding: 3px 10px;
      border: 1px solid #d4d4d4;
      text-decoration: none;
      text-shadow: 1px 1px 0 #fff;
K
Kamran Ahmed 已提交
118
      color: $text-color;
K
Kamran Ahmed 已提交
119 120 121
      font: 11px/normal sans-serif;
      cursor: pointer;
      outline: 0;
K
Kamran Ahmed 已提交
122
      background-color: $button-bg;
K
Kamran Ahmed 已提交
123 124
      border-radius: 2px;
      zoom: 1;
D
Diogo Moretti 已提交
125
      line-height: 1.3;
K
Kamran Ahmed 已提交
126
    }
K
Kamran Ahmed 已提交
127

128
    button.driver-disabled {
K
Kamran Ahmed 已提交
129
      color: $disabled-btn-color;
K
Kamran Ahmed 已提交
130 131 132 133
      cursor: default;
      pointer-events: none;
    }

K
Kamran Ahmed 已提交
134
    .driver-close-btn {
K
Kamran Ahmed 已提交
135 136 137
      float: left;
    }

138 139 140 141
    .driver-close-only-btn {
      float: right;
    }

K
Kamran Ahmed 已提交
142
    .driver-btn-group {
K
Kamran Ahmed 已提交
143 144
      float: right;
    }
K
Kamran Ahmed 已提交
145 146
  }

K
Kamran Ahmed 已提交
147
  .driver-popover-title {
K
Kamran Ahmed 已提交
148
    font: 19px/normal sans-serif;
K
Kamran Ahmed 已提交
149 150 151 152
    margin: 0 0 5px;
    font-weight: bold;
    display: block;
    position: relative;
K
Kamran Ahmed 已提交
153 154
    line-height: 1.5;
    zoom: 1;
K
Kamran Ahmed 已提交
155 156
  }

K
Kamran Ahmed 已提交
157
  .driver-popover-description {
K
Kamran Ahmed 已提交
158
    margin-bottom: 0;
K
Kamran Ahmed 已提交
159
    font: 14px/normal sans-serif;
K
Kamran Ahmed 已提交
160
    line-height: 1.5;
K
Kamran Ahmed 已提交
161
    color: $text-color;
K
Kamran Ahmed 已提交
162
    font-weight: normal;
K
Kamran Ahmed 已提交
163
    zoom: 1;
K
Kamran Ahmed 已提交
164
  }
165 166
}

167 168 169 170 171 172 173 174 175 176 177
.driver-clearfix:before {
  content: "";
  display: table;
}

.driver-clearfix:after {
  clear: both;
  content: "";
  display: table;
}

178
.driver-stage-no-animation {
179 180 181 182 183
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
184 185

  background: transparent !important;
186
  outline: 5000px solid rgba(0, 0, 0, 0.75);
187 188
}

189
div#driver-page-overlay {
190
  background: #000000;
191 192 193 194 195
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
196 197 198 199 200 201
  display: block;
  width: 100%;
  height: 100%;
  zoom: 1;
  filter: alpha(opacity=75);
  opacity: 0.75;
202
  z-index: $overlay-z-index !important;
K
Kamran Ahmed 已提交
203 204 205 206 207 208

  -webkit-transition: all $animation-sec;
  -moz-transition: all $animation-sec;
  -ms-transition: all $animation-sec;
  -o-transition: all $animation-sec;
  transition: all $animation-sec;
209 210 211 212 213 214 215 216
}

div#driver-highlighted-element-stage {
  position: absolute;
  top: 0;
  left: 0;
  height: 50px;
  width: 300px;
K
Kamran Ahmed 已提交
217
  background: $stage-bg;
218
  z-index: $stage-z-index !important;
219
  display: none;
220
  border-radius: 2px;
K
Kamran Ahmed 已提交
221

K
Kamran Ahmed 已提交
222 223 224 225 226
  -webkit-transition: all $animation-sec;
  -moz-transition: all $animation-sec;
  -ms-transition: all $animation-sec;
  -o-transition: all $animation-sec;
  transition: all $animation-sec;
227 228 229
}

.driver-highlighted-element {
230
  z-index: $highlighted-element-z-index !important;
231 232 233
}

.driver-position-relative {
234
  position: relative !important;
D
Diogo Moretti 已提交
235
}
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254

.driver-fix-stacking {
  z-index: auto !important;
  opacity: 1.0 !important;
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -ms-transform: none !important;
  -o-transform: none !important;
  transform: none !important;
  -webkit-filter: none !important;
  -moz-filter: none !important;
  -ms-filter: none !important;
  -o-filter: none !important;
  filter: none !important;
  -webkit-perspective: none !important;
  -moz-perspective: none !important;
  -ms-perspective: none !important;
  -o-perspective: none !important;
  perspective: none !important;
255 256 257 258 259 260 261 262 263
  -webkit-transform-style: flat !important;
  -moz-transform-style: flat !important;
  -ms-transform-style: flat !important;
  transform-style: flat !important;
  -webkit-transform-box: border-box !important;
  -moz-transform-box: border-box !important;
  -ms-transform-box: border-box !important;
  -o-transform-box: border-box !important;
  transform-box: border-box !important;
K
Kamran Ahmed 已提交
264
  will-change: unset !important;
B
Bastien 已提交
265
}