choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
72 lines (61 loc) • 1.28 kB
text/less
@import '../../style/themes/default';
@import '../../style/mixins/index';
@rate-prefix-cls: ~'@{c7n-prefix}-rate';
.@{rate-prefix-cls} {
.reset-component;
display: inline-block;
margin: 0;
padding: 0;
color: @rate-star-color;
font-size: 0.2rem;
line-height: unset;
list-style: none;
outline: none;
&-disabled &-star {
cursor: default;
&:hover {
transform: scale(1);
}
}
&-star {
position: relative;
display: inline-block;
margin: 0 0.08rem 0 0;
padding: 0;
color: inherit;
cursor: pointer;
transition: all @animation-duration-slow;
&-first,
&-second {
color: @rate-star-bg;
transition: all @animation-duration-slow;
user-select: none;
}
&-focused,
&:hover {
transform: scale(1.1);
}
&-first {
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 100%;
overflow: hidden;
opacity: 0;
}
&-half &-first,
&-half &-second {
opacity: 1;
}
&-half &-first,
&-full &-second {
color: inherit;
}
}
&-text {
display: inline-block;
margin-left: 0.08rem;
font-size: @font-size-base;
}
}