Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
3.2 KiB

//
// Popovers (to be used with popovers.js)
// --------------------------------------------------
12 years ago
.popover {
position: fixed;
top: 55px;
left: 50%;
z-index: 20;
display: none;
width: 280px;
padding: 5px;
margin-left: -140px;
background-color: $chrome-color;
12 years ago
border-radius: 6px;
opacity: 0;
box-shadow: 0 0 15px rgba(0, 0, 0, .05);
12 years ago
-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;
12 years ago
// Caret on top of popover using CSS triangles (thanks to @chriscoyier for solution)
&:after {
position: absolute;
top: -19px;
left: 50%;
width: 0;
height: 0;
margin-left: -20px;
content: '';
border-right: 20px solid transparent;
border-bottom: 20px solid $chrome-color;
border-left: 20px solid transparent;
}
12 years ago
}
// Wrapper for a title and buttons
12 years ago
.popover-header {
display: -webkit-box;
display: box;
height: 34px;
margin-bottom: 5px;
// Centered title for popover
.title {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
font-size: 16px;
font-weight: 500;
line-height: 45px;
color: #000;
text-align: center;
}
12 years ago
// Generic style for all buttons in .popover-header
[class*="button"] {
z-index: 25;
font-size: 16px;
font-weight: 400;
line-height: 29px;
color: $primary-color;
border: 0;
transition: opacity .2s linear;
-webkit-box-flex: 0;
box-flex: 0;
}
12 years ago
// 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
.title + [class*="button"]:last-child,
.button + [class*="button"]:last-child,
[class*="button"].pull-right {
position: absolute;
top: 5px;
right: 5px;
}
12 years ago
// Active state for popover header buttons
.button:active {
color: $primary-color;
background-color: transparent;
opacity: .3;
}
12 years ago
}
// Popover animation
// --------------------------------------------------
12 years ago
.popover.visible {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
// Backdrop (used as invisible touch escape)
// --------------------------------------------------
12 years ago
.backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
background-color: rgba(0,0,0,.5);
12 years ago
}
// Block level buttons in popovers
// --------------------------------------------------
12 years ago
// Positioning and giving darker border to look sharp against dark popover
12 years ago
.popover .button-block {
margin-bottom: 5px;
}
// Remove extra margin on bottom of last button
12 years ago
.popover .button-block:last-child {
margin-bottom: 0;
}
// Table views in popovers
// --------------------------------------------------
12 years ago
.popover .table-view {
12 years ago
width: auto;
max-height: 250px;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
overflow: auto;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, .15);
12 years ago
border-radius: 3px;
-webkit-overflow-scrolling: touch;
}