ratchet/sass/popovers.scss

98 строки
2.1 KiB
SCSS
Исходник Обычный вид История

2013-09-15 01:15:30 +04:00
//
// Popovers (to be used with popovers.js)
// --------------------------------------------------
2012-11-05 04:03:39 +04:00
.popover {
position: fixed;
top: 55px;
left: 50%;
z-index: 20;
display: none;
width: 280px;
2013-09-16 07:06:21 +04:00
margin-left: -140px;
2013-09-15 05:27:06 +04:00
background-color: $chrome-color;
border-radius: $border-radius;
2012-11-05 04:03:39 +04:00
opacity: 0;
2014-02-21 04:11:39 +04:00
@include box-shadow(0 0 15px rgba(0, 0, 0, .1));
2013-09-26 02:15:14 +04:00
@include transform(translate3d(0, -15px, 0));
2014-02-16 01:06:24 +04:00
@include transition(all .25s linear);
2012-11-05 04:03:39 +04:00
2013-09-21 23:49:15 +04:00
// Caret on top of popover using CSS triangles (thanks to @chriscoyier for solution)
2014-01-19 07:19:53 +04:00
&:before {
2013-09-21 23:49:15 +04:00
position: absolute;
2013-09-23 07:44:48 +04:00
top: -15px;
2013-09-21 23:49:15 +04:00
left: 50%;
width: 0;
height: 0;
2013-09-23 07:44:48 +04:00
margin-left: -15px;
border-right: 15px solid transparent;
border-bottom: 15px solid $chrome-color;
border-left: 15px solid transparent;
2014-02-09 12:34:29 +04:00
content: '';
2013-09-21 23:49:15 +04:00
}
2012-11-05 04:03:39 +04:00
2014-02-16 01:17:41 +04:00
// Popover transition
2013-09-23 04:33:05 +04:00
// --------------------------------------------------
2012-11-05 04:03:39 +04:00
2013-09-23 04:33:05 +04:00
&.visible {
opacity: 1;
2013-09-26 02:15:14 +04:00
@include transform(translate3d(0, 0, 0));
2013-09-23 04:33:05 +04:00
}
2014-02-09 03:20:58 +04:00
2014-02-21 04:11:39 +04:00
// Give correct spacing to the content if there is a bar inside the popover.
2014-02-09 03:20:58 +04:00
.bar ~ .table-view {
padding-top: $bar-base-height;
}
2012-11-05 04:03:39 +04:00
}
2013-09-15 01:15:30 +04:00
// Backdrop (used as invisible touch escape)
// --------------------------------------------------
2012-11-05 04:03:39 +04:00
.backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
2014-02-16 01:17:41 +04:00
z-index: 15;
2014-02-21 06:02:13 +04:00
background-color: rgba(0,0,0,.3);
2013-12-15 04:21:22 +04:00
}
2014-02-10 03:07:40 +04:00
// Block level buttons in popovers
// --------------------------------------------------
.popover .btn-block {
margin-bottom: 5px;
// Remove extra margin on bottom of last button
&:last-child {
margin-bottom: 0;
}
}
// Popovers with nav bars
// --------------------------------------------------
.popover .bar-nav {
border-bottom: $border-default;
2014-02-21 06:02:13 +04:00
border-top-right-radius: 12px;
border-top-left-radius: 12px;
@include box-shadow(none);
}
2014-02-10 03:07:40 +04:00
// Table views in popovers
// --------------------------------------------------
.popover .table-view {
max-height: 300px;
margin-bottom: 0;
overflow: auto;
background-color: #fff;
2014-02-16 01:06:24 +04:00
border-top: 0;
border-bottom: 0;
2014-02-10 03:07:40 +04:00
border-radius: $border-radius;
-webkit-overflow-scrolling: touch;
}