ant-design-vue/components/popover/style/index.less

205 lines
5.0 KiB
Plaintext
Raw Normal View History

2019-01-02 13:01:56 +00:00
@import '../../style/themes/default';
@import '../../style/mixins/index';
2018-01-12 08:10:41 +00:00
2019-01-02 13:01:56 +00:00
@popover-prefix-cls: ~'@{ant-prefix}-popover';
2018-01-12 08:10:41 +00:00
.@{popover-prefix-cls} {
2018-01-15 10:54:26 +00:00
.reset-component;
2018-01-12 08:10:41 +00:00
position: absolute;
top: 0;
left: 0;
z-index: @zindex-popover;
font-weight: normal;
2019-03-30 08:06:06 +00:00
white-space: normal;
2018-01-12 08:10:41 +00:00
text-align: left;
2019-03-30 08:06:06 +00:00
cursor: auto;
user-select: text;
2018-01-12 08:10:41 +00:00
2019-03-30 08:06:06 +00:00
&::after {
2018-01-12 08:10:41 +00:00
position: absolute;
2019-03-30 08:06:06 +00:00
background: fade(@white, 1%);
content: '';
2018-01-12 08:10:41 +00:00
}
&-hidden {
display: none;
}
// Offset the popover to account for the popover arrow
&-placement-top,
&-placement-topLeft,
&-placement-topRight {
padding-bottom: @popover-distance;
}
&-placement-right,
&-placement-rightTop,
&-placement-rightBottom {
padding-left: @popover-distance;
}
&-placement-bottom,
&-placement-bottomLeft,
&-placement-bottomRight {
padding-top: @popover-distance;
}
&-placement-left,
&-placement-leftTop,
&-placement-leftBottom {
padding-right: @popover-distance;
}
&-inner {
background-color: @popover-bg;
background-clip: padding-box;
border-radius: @border-radius-base;
box-shadow: @box-shadow-base;
2019-03-30 08:06:06 +00:00
box-shadow: ~'0 0 8px @{shadow-color} \9';
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* IE10+ */
&-inner {
box-shadow: @box-shadow-base;
}
2018-01-12 08:10:41 +00:00
}
&-title {
min-width: @popover-min-width;
2019-03-30 08:06:06 +00:00
min-height: 32px;
2018-01-12 08:10:41 +00:00
margin: 0; // reset heading margin
2018-01-15 10:54:26 +00:00
padding: 5px @padding-md 4px;
color: @heading-color;
2018-01-12 08:10:41 +00:00
font-weight: 500;
2019-03-30 08:06:06 +00:00
border-bottom: 1px solid @border-color-split;
2018-01-12 08:10:41 +00:00
}
&-inner-content {
2018-01-15 10:54:26 +00:00
padding: 12px @padding-md;
2018-01-12 08:10:41 +00:00
color: @popover-color;
}
&-message {
2019-03-30 08:06:06 +00:00
position: relative;
2018-01-15 10:54:26 +00:00
padding: 4px 0 12px;
2018-01-12 08:10:41 +00:00
color: @popover-color;
2019-03-30 08:06:06 +00:00
font-size: @font-size-base;
2018-01-12 08:10:41 +00:00
> .@{iconfont-css-prefix} {
position: absolute;
2018-11-14 13:33:56 +00:00
top: 8px; // 4px for padding-top, 4px for vertical middle;
color: @warning-color;
font-size: @font-size-base;
2018-01-12 08:10:41 +00:00
}
&-title {
2018-01-15 10:54:26 +00:00
padding-left: @font-size-base + 8px;
2018-01-12 08:10:41 +00:00
}
}
&-buttons {
2018-01-15 10:54:26 +00:00
margin-bottom: 4px;
2019-03-30 08:06:06 +00:00
text-align: right;
2018-01-12 08:10:41 +00:00
button {
margin-left: 8px;
}
}
// Arrows
// .popover-arrow is outer, .popover-arrow:after is inner
&-arrow {
2018-01-15 10:54:26 +00:00
position: absolute;
display: block;
2019-03-30 08:06:06 +00:00
width: sqrt(@popover-arrow-width * @popover-arrow-width * 2);
height: sqrt(@popover-arrow-width * @popover-arrow-width * 2);
background: transparent;
border-width: sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2;
2018-01-15 10:54:26 +00:00
border-style: solid;
2019-03-30 08:06:06 +00:00
transform: rotate(45deg);
2018-01-12 08:10:41 +00:00
}
&-placement-top > &-content > &-arrow,
2019-01-02 13:01:56 +00:00
&-placement-topLeft > &-content > &-arrow,
&-placement-topRight > &-content > &-arrow {
2019-03-30 08:06:06 +00:00
bottom: @popover-distance - @popover-arrow-width + 2.2px;
border-top-color: transparent;
border-right-color: @popover-bg;
border-bottom-color: @popover-bg;
border-left-color: transparent;
box-shadow: 3px 3px 7px fade(@black, 7%);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-top > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
left: 50%;
2018-01-15 10:54:26 +00:00
transform: translateX(-50%) rotate(45deg);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-topLeft > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
left: 16px;
}
2019-01-02 13:01:56 +00:00
&-placement-topRight > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
right: 16px;
}
2019-01-02 13:01:56 +00:00
&-placement-right > &-content > &-arrow,
&-placement-rightTop > &-content > &-arrow,
&-placement-rightBottom > &-content > &-arrow {
2018-01-15 10:54:26 +00:00
left: @popover-distance - @popover-arrow-width + 2px;
2019-03-30 08:06:06 +00:00
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: @popover-bg;
border-left-color: @popover-bg;
box-shadow: -3px 3px 7px fade(@black, 7%);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-right > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
top: 50%;
2018-01-15 10:54:26 +00:00
transform: translateY(-50%) rotate(45deg);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-rightTop > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
top: 12px;
}
2019-01-02 13:01:56 +00:00
&-placement-rightBottom > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
bottom: 12px;
}
2019-01-02 13:01:56 +00:00
&-placement-bottom > &-content > &-arrow,
&-placement-bottomLeft > &-content > &-arrow,
&-placement-bottomRight > &-content > &-arrow {
2018-01-15 10:54:26 +00:00
top: @popover-distance - @popover-arrow-width + 2px;
2019-03-30 08:06:06 +00:00
border-top-color: @popover-bg;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: @popover-bg;
box-shadow: -2px -2px 5px fade(@black, 6%);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-bottom > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
left: 50%;
2018-01-15 10:54:26 +00:00
transform: translateX(-50%) rotate(45deg);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-bottomLeft > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
left: 16px;
}
2019-01-02 13:01:56 +00:00
&-placement-bottomRight > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
right: 16px;
}
2019-01-02 13:01:56 +00:00
&-placement-left > &-content > &-arrow,
&-placement-leftTop > &-content > &-arrow,
&-placement-leftBottom > &-content > &-arrow {
2018-01-15 10:54:26 +00:00
right: @popover-distance - @popover-arrow-width + 2px;
2019-03-30 08:06:06 +00:00
border-top-color: @popover-bg;
border-right-color: @popover-bg;
border-bottom-color: transparent;
border-left-color: transparent;
box-shadow: 3px -3px 7px fade(@black, 7%);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-left > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
top: 50%;
2018-01-15 10:54:26 +00:00
transform: translateY(-50%) rotate(45deg);
2018-01-12 08:10:41 +00:00
}
2019-01-02 13:01:56 +00:00
&-placement-leftTop > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
top: 12px;
}
2019-01-02 13:01:56 +00:00
&-placement-leftBottom > &-content > &-arrow {
2018-01-12 08:10:41 +00:00
bottom: 12px;
}
}