mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
bfc97fdaf6
* IE8 refused a negative z-index to place the previous :after behind the .arrow, so I had to flip the styles. * .arrow is the gray border/background, .arrow:after is now the white inner arrow * Added a hex IE8 fallback to ensure the arrow shows for <IE9 as rgba() isn't supported * Simplified some of the CSS for the popover carets
190 lines
4.7 KiB
Plaintext
190 lines
4.7 KiB
Plaintext
//
|
|
// Popovers
|
|
// --------------------------------------------------
|
|
|
|
|
|
.popover {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: @zindexPopover;
|
|
display: none;
|
|
width: 236px;
|
|
padding: 1px;
|
|
background-color: @popoverBackground;
|
|
-webkit-background-clip: padding-box;
|
|
-moz-background-clip: padding;
|
|
background-clip: padding-box;
|
|
border: 1px solid #ccc;
|
|
border: 1px solid rgba(0,0,0,.2);
|
|
.border-radius(6px);
|
|
.box-shadow(0 5px 10px rgba(0,0,0,.2));
|
|
|
|
// Overrides for proper insertion
|
|
white-space: normal;
|
|
|
|
// Offset the popover to account for the popover arrow
|
|
&.top { margin-top: -10px; }
|
|
&.right { margin-left: 10px; }
|
|
&.bottom { margin-top: 10px; }
|
|
&.left { margin-left: -10px; }
|
|
}
|
|
|
|
.popover-title {
|
|
margin: 0; // reset heading margin
|
|
padding: 8px 14px;
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
line-height: 18px;
|
|
background-color: @popoverTitleBackground;
|
|
border-bottom: 1px solid darken(@popoverTitleBackground, 5%);
|
|
.border-radius(5px 5px 0 0);
|
|
}
|
|
|
|
.popover-content {
|
|
padding: 9px 14px;
|
|
p, ul, ol {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
// Arrows
|
|
//
|
|
// .arrow is outer, .arrow:after is inner
|
|
|
|
.popover .arrow,
|
|
.popover .arrow:after {
|
|
position: absolute;
|
|
display: block;
|
|
width: 0;
|
|
height: 0;
|
|
border-color: transparent;
|
|
border-style: solid;
|
|
}
|
|
.popover .arrow {
|
|
border-width: @popoverArrowOuterWidth;
|
|
}
|
|
.popover .arrow:after {
|
|
border-width: @popoverArrowWidth;
|
|
content: "";
|
|
}
|
|
|
|
.popover {
|
|
&.top .arrow {
|
|
left: 50%;
|
|
margin-left: -@popoverArrowOuterWidth;
|
|
border-bottom-width: 0;
|
|
border-top-color: #999; // IE8 fallback
|
|
border-top-color: @popoverArrowOuterColor;
|
|
bottom: -@popoverArrowOuterWidth;
|
|
&:after {
|
|
bottom: 1px;
|
|
margin-left: -@popoverArrowWidth;
|
|
border-bottom-width: 0;
|
|
border-top-color: @popoverArrowColor;
|
|
}
|
|
}
|
|
&.right .arrow {
|
|
top: 50%;
|
|
left: -@popoverArrowOuterWidth;
|
|
margin-top: -@popoverArrowOuterWidth;
|
|
border-left-width: 0;
|
|
border-right-color: #999; // IE8 fallback
|
|
border-right-color: @popoverArrowOuterColor;
|
|
&:after {
|
|
left: 1px;
|
|
bottom: -@popoverArrowWidth;
|
|
border-left-width: 0;
|
|
border-right-color: @popoverArrowColor;
|
|
}
|
|
}
|
|
&.bottom .arrow {
|
|
left: 50%;
|
|
margin-left: -@popoverArrowOuterWidth;
|
|
border-top-width: 0;
|
|
border-bottom-color: #999; // IE8 fallback
|
|
border-bottom-color: @popoverArrowOuterColor;
|
|
top: -@popoverArrowOuterWidth;
|
|
&:after {
|
|
top: 1px;
|
|
margin-left: -@popoverArrowWidth;
|
|
border-top-width: 0;
|
|
border-bottom-color: @popoverArrowColor;
|
|
}
|
|
}
|
|
|
|
&.left .arrow {
|
|
top: 50%;
|
|
right: -@popoverArrowOuterWidth;
|
|
margin-top: -@popoverArrowOuterWidth;
|
|
border-right-width: 0;
|
|
border-left-color: #999; // IE8 fallback
|
|
border-left-color: @popoverArrowOuterColor;
|
|
&:after {
|
|
right: 1px;
|
|
border-right-width: 0;
|
|
border-left-color: @popoverArrowColor;
|
|
bottom: -@popoverArrowWidth;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
&.top .arrow {
|
|
bottom: -@popoverArrowWidth;
|
|
left: 50%;
|
|
margin-left: -@popoverArrowWidth;
|
|
border-width: @popoverArrowWidth @popoverArrowWidth 0;
|
|
//border-top-color: @popoverArrowColor;
|
|
border-top-color: blue;
|
|
&:after {
|
|
border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth 0;
|
|
//border-top-color: @popoverArrowOuterColor;
|
|
border-top-color: red;
|
|
top: -@popoverArrowWidth;
|
|
//bottom: -1px;
|
|
left: -@popoverArrowOuterWidth;
|
|
}
|
|
}
|
|
&.right .arrow {
|
|
top: 50%;
|
|
left: -@popoverArrowWidth;
|
|
margin-top: -@popoverArrowWidth;
|
|
border-width: @popoverArrowWidth @popoverArrowWidth @popoverArrowWidth 0;
|
|
border-right-color: @popoverArrowColor;
|
|
&:after {
|
|
border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth @popoverArrowOuterWidth 0;
|
|
border-right-color: @popoverArrowOuterColor;
|
|
bottom: -@popoverArrowOuterWidth;
|
|
left: -1px;
|
|
}
|
|
}
|
|
&.bottom .arrow {
|
|
top: -@popoverArrowWidth;
|
|
left: 50%;
|
|
margin-left: -@popoverArrowWidth;
|
|
border-width: 0 @popoverArrowWidth @popoverArrowWidth;
|
|
border-bottom-color: @popoverArrowColor;
|
|
&:after {
|
|
border-width: 0 @popoverArrowOuterWidth @popoverArrowOuterWidth;
|
|
border-bottom-color: @popoverArrowOuterColor;
|
|
top: -1px;
|
|
left: -@popoverArrowOuterWidth;
|
|
}
|
|
}
|
|
&.left .arrow {
|
|
top: 50%;
|
|
right: -@popoverArrowWidth;
|
|
margin-top: -@popoverArrowWidth;
|
|
border-width: @popoverArrowWidth 0 @popoverArrowWidth @popoverArrowWidth;
|
|
border-left-color: @popoverArrowColor;
|
|
&:after {
|
|
border-width: @popoverArrowOuterWidth 0 @popoverArrowOuterWidth @popoverArrowOuterWidth;
|
|
border-left-color: @popoverArrowOuterColor;
|
|
bottom: -@popoverArrowOuterWidth;
|
|
right: -1px;
|
|
}
|
|
}*/
|
|
}
|