UNPKG

rabbit-design

Version:

A lightweight UI plugin library written in TypeScript and based on JavaScript

158 lines (132 loc) 3.92 kB
@import '../custom.less'; @import '../mixins/tooltip.less'; @import '../animation/zoom.less'; @poptip-tag-name: r-poptip; @poptip-prefix-cls: ~'@{css-prefix}poptip'; @poptip-arrow: ~'@{poptip-prefix-cls}-arrow'; @poptip-max-width: 250px; @poptip-arrow-width: 7px; @poptip-arrow-outer-width: (@poptip-arrow-width + 1); @poptip-distance: @poptip-arrow-width - 1 + 4; @poptip-arrow-color: hsla(0, 0%, 85%, 0.5); @{poptip-tag-name} { display: inline-block; } .@{poptip-prefix-cls} { &-rel { display: inline-block; position: relative; } &-title { margin: 0; padding: @padding-xs @padding-md; position: relative; border-bottom: @border-width-base @border-style-base @border-color-split; &-inner { color: @title-color; font-size: @font-size-base; font-weight: 500; } } &-body { padding: @padding-sm @padding-md; &-content { overflow: auto; &-word-wrap { white-space: normal; text-align: justify; } &-inner { color: @text-color; } } } &-inner { width: 100%; background-color: @white; background-clip: padding-box; border-radius: @border-radius-base; box-shadow: @shadow-base; white-space: nowrap; } &-popper { min-width: 170px; font-size: @font-size-base; .popper(@poptip-arrow, @poptip-arrow-width, @poptip-distance, @poptip-arrow-color); &[x-placement^='top'] .@{poptip-arrow}:after { content: ' '; bottom: 1px; margin-left: -@poptip-arrow-width; border-bottom-width: 0; border-top-width: @poptip-arrow-width; border-top-color: @white; } &[x-placement^='right'] .@{poptip-arrow}:after { content: ' '; left: 1px; bottom: -@poptip-arrow-width; border-left-width: 0; border-right-width: @poptip-arrow-width; border-right-color: @white; } &[x-placement^='bottom'] .@{poptip-arrow}:after { content: ' '; top: 1px; margin-left: -@poptip-arrow-width; border-top-width: 0; border-bottom-width: @poptip-arrow-width; border-bottom-color: @white; } &[x-placement^='left'] .@{poptip-arrow}:after { content: ' '; right: 1px; border-right-width: 0; border-left-width: @poptip-arrow-width; border-left-color: @white; bottom: -@poptip-arrow-width; } } &-arrow { &, &:after { display: block; width: 0; height: 0; position: absolute; border-color: transparent; border-style: @border-style-base; } } &-arrow { border-width: @poptip-arrow-outer-width; } &-arrow:after { content: ''; border-width: @poptip-arrow-width; } &-confirm &-popper { max-width: 300px; } &-confirm &-inner { white-space: normal; } &-confirm &-body { padding: @padding-md @padding-md @padding-xs; .rab-icon { font-size: @font-size-large; color: @warning-color; line-height: 18px; position: absolute; } &-message { padding-left: 20px; } } &-confirm &-footer { text-align: right; padding: @padding-xs @padding-md @padding-md; button { margin-left: 4px; } } }