UNPKG

wetrade-design

Version:

一款多语言支持Vue3的UI框架

187 lines (160 loc) 4.41 kB
@import '../../style/themes/index'; @import '../../style/mixins/index'; @tag-prefix-cls: ~'@{wd-prefix}-tag'; @tag-popover-arrow-width: 5px; @tag-popover-arrow-rotate-width: sqrt(@tag-popover-arrow-width * @tag-popover-arrow-width * 2); @tag-popover-scale: 0.83; @tag-popover-padding: 0 ((1-@tag-popover-scale)/2) * 12px; .@{tag-prefix-cls} { .reset-component(); display: inline-block; height: auto; padding: @tag-long-padding; font-size: @tag-font-size; line-height: @tag-line-height; white-space: nowrap; background: @tag-default-bg; // border: @border-width-base @border-style-base @border-color-base; border-radius: @tag-border-radius; opacity: 1; transition: all 0.3s; &, a, a:hover { color: @tag-default-color; } > a:first-child:last-child { display: inline-block; margin: 0 -8px; padding: 0 8px; } &-close-icon { margin-left: 3px; color: @text-color-secondary; font-size: 10px; cursor: pointer; transition: all 0.3s; &:hover { color: @heading-color; } } &-has-color { border-color: transparent; &, a, a:hover, .@{iconfont-css-prefix}-close, .@{iconfont-css-prefix}-close:hover { color: @text-color-inverse; } } &-checkable { background-color: transparent; border-color: transparent; cursor: pointer; &:not(&-checked):hover { color: @brand-primary; } &:active, &-checked { color: @text-color-inverse; } &-checked { background-color: @primary-6; } &:active { background-color: @primary-7; } } &-hidden { display: none; } // mixin to iterate over colors and create CSS class for each one .make-color-classes(@i: length(@preset-colors)) when (@i > 0) { .make-color-classes(@i - 1); @color: extract(@preset-colors, @i); @lightColor: '@{color}-1'; @lightBorderColor: '@{color}-3'; @darkColor: '@{color}-6'; @textColor: '@{color}-7'; &-@{color} { color: @@textColor; background: @@lightColor; border-color: @@lightBorderColor; } &-@{color}-inverse { color: @text-color-inverse; background: @@darkColor; border-color: @@darkColor; } } .make-status-color-classes(@status, @cssVariableType) { @bgColor: '@{cssVariableType}-color-deprecated-bg'; @borderColor: '@{cssVariableType}-color-deprecated-border'; @textColor: '@{cssVariableType}-color'; &-@{status} { color: @@textColor; background: @@bgColor; border-color: @@borderColor; } } .make-color-classes(); // .make-status-color-classes(success, success); // .make-status-color-classes(processing, info); // .make-status-color-classes(error, error); // .make-status-color-classes(warning, warning); // To ensure that a space will be placed between character and `Icon`. > .@{iconfont-css-prefix} + span, > span + .@{iconfont-css-prefix} { margin-left: 7px; } &-region-type { display: inline-flex; justify-content: center; align-items: center; padding: 0; width: @tag-region-type-width; height: @tag-region-type-height; &-big { width: @tag-region-type-big-width; height: @tag-region-type-big-height; } } &-popover { position: relative; text-align: center; padding: @tag-popover-padding; border-radius: @tag-border-radius; height: @tag-popover-height; line-height: @tag-popover-height - 2px; border: 1px solid @tag-popover-border-color; color: @tag-popover-color; background-color: @tag-popover-bg-color; span { position: relative; display: inline-block; z-index: 1; font-weight: @tag-popover-font-weight; font-size: @tag-popover-font-size; transform: scale(@tag-popover-scale); } &::after { position: absolute; top: 50%; left: 1px; display: block; width: @tag-popover-arrow-width; height: @tag-popover-arrow-width; pointer-events: none; content: ''; background-color: @tag-popover-bg-color; border: 1px solid; border-color: transparent transparent @tag-popover-border-color @tag-popover-border-color; transform: translateX((-@tag-popover-arrow-rotate-width / 2)) translateY(-50%) rotate(45deg); } } &-short { padding: @tag-short-padding; } } @import './rtl';