mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
184 lines
4.5 KiB
SCSS
184 lines
4.5 KiB
SCSS
@import "./mixins/mixins.scss";
|
|
@import "./themes/vars.scss";
|
|
$popover-arrow-width: 6px;
|
|
|
|
.n-popover__raw-content, .n-popover__content {
|
|
&.n-popover-fade-enter-active,
|
|
&.n-popover-fade-leave-active {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
&.n-popover-fade-enter-active {
|
|
transition: opacity .15s $fast-in-cubic-bezier, transform .15s $fast-in-cubic-bezier;
|
|
}
|
|
&.n-popover-fade-enter, &.n-popover-fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
|
opacity: 0;
|
|
transform: scale(.9);
|
|
}
|
|
&.n-popover-fade-leave-to {
|
|
transition: opacity .15s $slow-out-cubic-bezier, transform .15s $slow-out-cubic-bezier;
|
|
}
|
|
}
|
|
.n-popover__content {
|
|
transform-origin: inherit;
|
|
position: relative;
|
|
border-radius: 6px;
|
|
background-color: rgba(75, 81, 106, 1);
|
|
color: #ffffffe6;
|
|
font-size: 12px;
|
|
opacity: 1;
|
|
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.16);
|
|
&.n-popover__content--without-arrow {
|
|
&[n-placement$="top-start"] {
|
|
margin-bottom: 6px;
|
|
}
|
|
&[n-placement$="top"] {
|
|
margin-bottom: 6px;
|
|
}
|
|
&[n-placement$="top-end"] {
|
|
margin-bottom: 6px;
|
|
}
|
|
&[n-placement$="bottom-start"] {
|
|
margin-top: 6px;
|
|
}
|
|
&[n-placement$="bottom"] {
|
|
margin-top: 6px;
|
|
}
|
|
&[n-placement$="bottom-end"] {
|
|
margin-top: 6px;
|
|
}
|
|
&[n-placement$="left-start"] {
|
|
margin-right: 6px;
|
|
}&[n-placement$="left"] {
|
|
margin-right: 6px;
|
|
}
|
|
&[n-placement$="left-end"] {
|
|
margin-right: 10px;
|
|
transform-origin: right center;
|
|
.n-popover__arrow {
|
|
right: -2 * $popover-arrow-width;
|
|
border-left-color: rgba(75, 81, 106, 1);
|
|
bottom: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="right-start"] {
|
|
margin-left: 6px;
|
|
}
|
|
&[n-placement$="right"] {
|
|
margin-left: 6px;
|
|
}
|
|
&[n-placement$="right-end"] {
|
|
margin-left: 6px;
|
|
}
|
|
}
|
|
.n-popover__arrow {
|
|
border-width: $popover-arrow-width;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
display: block;
|
|
width: 0;
|
|
height: 0;
|
|
border-color: transparent;
|
|
border-style: solid;
|
|
}
|
|
&[n-placement$="top-start"] {
|
|
margin-bottom: 10px;
|
|
|
|
.n-popover__arrow {
|
|
bottom: -2 * $popover-arrow-width;
|
|
border-top-color: rgba(75, 81, 106, 1);
|
|
left: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="top"] {
|
|
margin-bottom: 10px;
|
|
.n-popover__arrow {
|
|
bottom: -2 * $popover-arrow-width;
|
|
transform: translateX(-$popover-arrow-width);
|
|
border-top-color: rgba(75, 81, 106, 1);
|
|
left: 50%;
|
|
}
|
|
}
|
|
&[n-placement$="top-end"] {
|
|
margin-bottom: 10px;
|
|
.n-popover__arrow {
|
|
bottom: -2 * $popover-arrow-width;
|
|
border-top-color: rgba(75, 81, 106, 1);
|
|
right: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="bottom-start"] {
|
|
margin-top: 10px;
|
|
.n-popover__arrow {
|
|
top: -2 * $popover-arrow-width;
|
|
border-bottom-color: rgba(75, 81, 106, 1);
|
|
left: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="bottom"] {
|
|
margin-top: 10px;
|
|
.n-popover__arrow {
|
|
top: -2 * $popover-arrow-width;
|
|
transform: translateX(-$popover-arrow-width);
|
|
border-bottom-color: rgba(75, 81, 106, 1);
|
|
left: 50%;
|
|
}
|
|
}
|
|
&[n-placement$="bottom-end"] {
|
|
margin-top: 10px;
|
|
.n-popover__arrow {
|
|
top: -2 * $popover-arrow-width;
|
|
border-bottom-color: rgba(75, 81, 106, 1);
|
|
right: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="left-start"] {
|
|
margin-right: 10px;
|
|
.n-popover__arrow {
|
|
right: -2 * $popover-arrow-width;
|
|
border-left-color: rgba(75, 81, 106, 1);
|
|
top: 10px;
|
|
}
|
|
}&[n-placement$="left"] {
|
|
margin-right: 10px;
|
|
.n-popover__arrow {
|
|
right: -2 * $popover-arrow-width;
|
|
transform: translateY(-$popover-arrow-width);
|
|
border-left-color: rgba(75, 81, 106, 1);
|
|
top: 50%;
|
|
}
|
|
}
|
|
&[n-placement$="left-end"] {
|
|
margin-right: 10px;
|
|
.n-popover__arrow {
|
|
right: -2 * $popover-arrow-width;
|
|
border-left-color: rgba(75, 81, 106, 1);
|
|
bottom: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="right-start"] {
|
|
margin-left: 10px;
|
|
.n-popover__arrow {
|
|
left: -2 * $popover-arrow-width;
|
|
border-right-color: rgba(75, 81, 106, 1);
|
|
top: 10px;
|
|
}
|
|
}
|
|
&[n-placement$="right"] {
|
|
margin-left: 10px;
|
|
.n-popover__arrow {
|
|
left: -2 * $popover-arrow-width;
|
|
transform: translateY(-$popover-arrow-width);
|
|
border-right-color: rgba(75, 81, 106, 1);
|
|
top: 50%;
|
|
}
|
|
}
|
|
&[n-placement$="right-end"] {
|
|
margin-left: 10px;
|
|
.n-popover__arrow {
|
|
left: -2 * $popover-arrow-width;
|
|
border-right-color: rgba(75, 81, 106, 1);
|
|
bottom: 10px;
|
|
}
|
|
}
|
|
} |