| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- //@import '../theme/variables.scss';
- @import "./variables.scss";
- @import "./mixin.scss";
- $module: #{$prefix}-tag;
- $colors: "amber", "blue", "cyan", "green", "grey", "indigo", "light-blue", "light-green", "lime", "orange", "pink",
- "purple", "red", "teal", "violet", "yellow";
- $types: "ghost", "solid", "light";
- .#{$module} {
- box-sizing: border-box;
- display: inline-block;
- border-radius: $radius-tag;
- background-color: transparent;
- position: relative;
- user-select: none;
- // hidden avatar tag image
- overflow: hidden;
- white-space: nowrap;
- vertical-align: bottom;
- &-default,
- &-small {
- @include font-size-small;
- height: $height-tag_small;
- padding: $spacing-tag_small-paddingY $spacing-tag_small-paddingX;
- &:focus-visible {
- outline: $width-tag-outline solid $color-tag-outline-focus;
- }
- }
- &-square {
- border-radius: $radius-tag;
- }
- &-circle {
- border-radius: $radius-tag_circle;
- }
- &-large {
- @include font-size-small;
- padding: $spacing-tag_large-paddingY $spacing-tag_large-paddingX;
- height: $height-tag_large;
- &:focus-visible {
- outline: $width-tag-outline solid $color-tag-outline-focus;
- }
- }
- &-invisible {
- display: none;
- }
- &-content {
- display: flex;
- @include all-center;
- height: 100%;
- }
- &-close {
- @include all-center;
- color: $color-tag_close-icon-default;
- padding-left: $spacing-tag_close-paddingLeft;
- cursor: pointer;
- }
- &-closable {
- padding: $spacing-tag_closable-paddingTop $spacing-tag_closable-paddingRight $spacing-tag_closable-paddingBottom
- $spacing-tag_closable-paddingLeft;
- }
- &-avatar-square,
- &-avatar-circle {
- .#{$prefix}-avatar {
- margin-right: $spacing-tag_avatar-marginRight;
- }
- }
- &-avatar-square {
- padding: $spacing-tag_avatar_square-paddingTop $spacing-tag_avatar_square-paddingRight
- $spacing-tag_avatar_square-paddingBottom $spacing-tag_avatar_square-paddingLeft;
- .#{$prefix}-avatar {
- & > img {
- background-color: $color-tag_avatar_square_img-bg-default;
- }
- }
- }
- &-avatar-circle {
- padding: $spacing-tag_avatar_circle-paddingTop $spacing-tag_avatar_circle-paddingRight
- $spacing-tag_avatar_circle-paddingBottom $spacing-tag_avatar_circle-paddingLeft;
- }
- &-avatar-square.#{$module}-default,
- &-avatar-square.#{$module}-small {
- .#{$prefix}-avatar {
- width: $height-tag_small;
- height: $height-tag_small;
- }
- }
- &-avatar-square.#{$module}-large {
- .#{$prefix}-avatar {
- width: $height-tag_large;
- height: $height-tag_large;
- }
- }
- &-avatar-circle.#{$module}-small,
- &-avatar-circle.#{$module}-default {
- // when avatarShape=circle change tag border radius
- border-radius: $height-tag_small * 0.5 + 1;
- .#{$prefix}-avatar {
- width: $width-tag_avatar_circle_small;
- height: $width-tag_avatar_circle_small;
- }
- }
- &-avatar-circle.#{$module}-large {
- border-radius: $height-tag_large * 0.5 + 1;
- .#{$prefix}-avatar {
- width: $width-tag_avatar_circle_large;
- height: $width-tag_avatar_circle_large;
- }
- }
- }
- .#{$module}-group {
- display: block;
- .#{$module} {
- margin-bottom: $spacing-tag_group-marginBottom;
- margin-right: $spacing-tag_group-marginRight;
- }
- height: auto;
- &-max.#{$module}-group-small {
- height: ($height-tag_small + 2);
- }
- &-max.#{$module}-group-large {
- height: ($height-tag_large + 2);
- }
- // &-small {
- // height: ($height-tag_small + 2);
- // }
- // &-large {
- // height: ($height-tag_large + 2);
- // }
- }
- .#{$module}-rest-group-popover {
- .#{$module} {
- margin-right: $spacing-tag_group-marginRight;
- margin-bottom: $spacing-tag_group-marginBottom;
- &:last-of-type {
- margin-right: 0;
- }
- }
- }
- @each $c in $colors {
- @each $t in $types {
- .#{$module}-#{$c}-#{$t} {
- @include tag-style($c, $t);
- }
- }
- }
- @each $t in $types {
- .#{$module}-white-#{$t} {
- background-color: $color-tag_white-bg-default;
- border: $width-tag-border solid $color-tag_white-border-default;
- color: $color-tag_white-text-default;
- // .#{$module}-close {
- // color: $tag-color-white-default-icon;
- // }
- }
- }
- .#{$module}-white-ghost,
- .#{$module}-white-light,
- .#{$module}-white-solid {
- .#{$module}-close {
- color: $color-tag_white-icon-default;
- }
- }
- .#{$module}-avatar-square,
- .#{$module}-avatar-circle {
- background-color: $color-tag_avatar-bg-default;
- border: $width-tag_avatar-border solid $color-tag_avatar-border-default;
- color: $color-tag_avatar-text-default;
- }
- .#{$module}-solid {
- .#{$module}-close {
- color: $color-tag_close-icon_deep-default;
- }
- }
- @import './rtl.scss';
|