2016-04-27 20:44:36 +08:00
|
|
|
@import "../../style/themes/default";
|
|
|
|
@import "../../style/mixins/index";
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
@popover-prefix-cls: ~"@{ant-prefix}-popover";
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{popover-prefix-cls} {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2015-06-17 16:58:13 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2016-03-28 16:01:37 +08:00
|
|
|
z-index: @zindex-popover;
|
2015-06-17 16:58:13 +08:00
|
|
|
cursor: auto;
|
|
|
|
user-select: text;
|
|
|
|
white-space: normal;
|
|
|
|
font-weight: normal;
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
2016-03-13 15:28:56 +08:00
|
|
|
background: rgba(255, 255, 255, 0.01);
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Offset the popover to account for the popover arrow
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-top,
|
|
|
|
&-placement-topLeft,
|
|
|
|
&-placement-topRight {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-bottom: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-right,
|
|
|
|
&-placement-rightTop,
|
|
|
|
&-placement-rightBottom {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-left: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-bottom,
|
|
|
|
&-placement-bottomLeft,
|
|
|
|
&-placement-bottomRight {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-top: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-left,
|
|
|
|
&-placement-leftTop,
|
|
|
|
&-placement-leftBottom {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-right: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-inner {
|
|
|
|
background-color: @popover-bg;
|
|
|
|
background-clip: padding-box;
|
|
|
|
border-radius: @border-radius-base;
|
2015-12-02 11:53:37 +08:00
|
|
|
box-shadow: @box-shadow-base;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-title {
|
2016-10-20 11:23:30 +08:00
|
|
|
min-width: @popover-min-width;
|
2015-06-17 16:58:13 +08:00
|
|
|
margin: 0; // reset heading margin
|
2017-10-16 19:53:46 +08:00
|
|
|
padding: 5px @padding-md 4px;
|
2017-09-08 16:47:04 +08:00
|
|
|
min-height: 32px;
|
2016-03-04 17:06:39 +08:00
|
|
|
border-bottom: 1px solid @border-color-split;
|
2017-09-27 22:32:49 +08:00
|
|
|
color: @heading-color;
|
2017-03-07 14:29:02 +08:00
|
|
|
font-weight: 500;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2016-03-17 15:10:49 +08:00
|
|
|
&-inner-content {
|
2017-10-19 11:45:56 +08:00
|
|
|
padding: 12px @padding-md;
|
2017-05-04 01:35:06 +08:00
|
|
|
color: @popover-color;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-06-24 19:20:47 +08:00
|
|
|
&-message {
|
2017-11-06 21:28:51 +08:00
|
|
|
padding: 4px 0 12px;
|
2016-11-08 20:57:07 +08:00
|
|
|
font-size: @font-size-base;
|
2017-05-04 01:35:06 +08:00
|
|
|
color: @popover-color;
|
2016-09-14 16:18:33 +08:00
|
|
|
> .@{iconfont-css-prefix} {
|
2016-03-28 16:09:13 +08:00
|
|
|
color: @warning-color;
|
2017-10-18 17:16:14 +08:00
|
|
|
line-height: @line-height-base + 0.1;
|
2016-03-10 16:22:52 +08:00
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
&-title {
|
2017-09-27 22:32:49 +08:00
|
|
|
padding-left: @font-size-base + 8px;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-buttons {
|
|
|
|
text-align: right;
|
2017-11-06 21:28:51 +08:00
|
|
|
margin-bottom: 4px;
|
2015-06-17 16:58:13 +08:00
|
|
|
button {
|
2015-07-16 11:50:36 +08:00
|
|
|
margin-left: 8px;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Arrows
|
|
|
|
// .popover-arrow is outer, .popover-arrow:after is inner
|
|
|
|
|
|
|
|
&-arrow {
|
|
|
|
&,
|
|
|
|
&:after {
|
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-color: transparent;
|
|
|
|
border-style: solid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-arrow {
|
2017-10-19 16:00:24 +08:00
|
|
|
background: @popover-bg;
|
|
|
|
width: sqrt(@popover-arrow-width * @popover-arrow-width * 2);
|
|
|
|
height: sqrt(@popover-arrow-width * @popover-arrow-width * 2);
|
|
|
|
transform: rotate(45deg);
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-top > &-content > &-arrow,
|
|
|
|
&-placement-topLeft > &-content > &-arrow,
|
|
|
|
&-placement-topRight > &-content > &-arrow {
|
2017-10-19 16:00:24 +08:00
|
|
|
bottom: @popover-distance - @popover-arrow-width + 1px;
|
|
|
|
box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.07);
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-top > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
left: 50%;
|
2017-10-19 16:00:24 +08:00
|
|
|
margin-left: -@popover-arrow-width;
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-topLeft > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
left: 16px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-topRight > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
right: 16px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
|
|
|
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-right > &-content > &-arrow,
|
|
|
|
&-placement-rightTop > &-content > &-arrow,
|
|
|
|
&-placement-rightBottom > &-content > &-arrow {
|
2017-10-19 16:00:24 +08:00
|
|
|
left: @popover-distance - @popover-arrow-width + 1px;
|
|
|
|
box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.08);
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-right > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
top: 50%;
|
2017-10-19 16:00:24 +08:00
|
|
|
margin-top: -@popover-arrow-width;
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-rightTop > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
top: 12px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-rightBottom > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
bottom: 12px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
|
|
|
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-bottom > &-content > &-arrow,
|
|
|
|
&-placement-bottomLeft > &-content > &-arrow,
|
|
|
|
&-placement-bottomRight > &-content > &-arrow {
|
2017-10-19 16:00:24 +08:00
|
|
|
top: @popover-distance - @popover-arrow-width + 1px;
|
|
|
|
box-shadow: -3px -3px 6px rgba(0, 0, 0, 0.08);
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-bottom > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
left: 50%;
|
2017-10-19 16:00:24 +08:00
|
|
|
margin-left: -@popover-arrow-width;
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-bottomLeft > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
left: 16px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-bottomRight > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
right: 16px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-left > &-content > &-arrow,
|
|
|
|
&-placement-leftTop > &-content > &-arrow,
|
|
|
|
&-placement-leftBottom > &-content > &-arrow {
|
2017-10-19 16:00:24 +08:00
|
|
|
right: @popover-distance - @popover-arrow-width + 1px;
|
|
|
|
box-shadow: 3px -3px 6px rgba(0, 0, 0, 0.08);
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-left > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
top: 50%;
|
2017-10-19 16:00:24 +08:00
|
|
|
margin-top: -@popover-arrow-width;
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-leftTop > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
top: 12px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2016-11-01 12:34:39 +08:00
|
|
|
&-placement-leftBottom > &-content > &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
bottom: 12px;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|