ant-design/components/rate/style/index.less

70 lines
1.1 KiB
Plaintext
Raw Normal View History

@import "../../style/themes/default";
@import "../../style/mixins/index";
@rate-prefix-cls: ~"@{ant-prefix}-rate";
2016-03-30 13:20:03 +08:00
.@{rate-prefix-cls} {
.reset-component;
2016-03-30 13:20:03 +08:00
margin: 0;
padding: 0;
list-style: none;
font-size: 20px;
2016-03-30 13:20:03 +08:00
display: inline-block;
color: @rate-star-color;
2016-03-30 13:20:03 +08:00
2016-03-31 14:43:38 +08:00
&-disabled &-star {
cursor: not-allowed;
2016-03-31 14:43:38 +08:00
&:hover {
transform: scale(1);
}
2016-03-30 13:20:03 +08:00
}
&-star {
margin: 0;
padding: 0;
display: inline-block;
2016-03-31 14:43:38 +08:00
margin-right: 8px;
2016-03-30 13:20:03 +08:00
position: relative;
transition: all .3s;
color: inherit;
cursor: pointer;
2016-03-31 14:43:38 +08:00
&-first,
&-second {
user-select: none;
transition: all .3s;
color: @rate-star-bg;
2016-03-31 14:43:38 +08:00
}
&:hover {
transform: scale(1.1);
2016-03-31 14:43:38 +08:00
}
2016-03-30 13:20:03 +08:00
&-first {
2016-03-30 13:20:03 +08:00
position: absolute;
left: 0;
top: 0;
width: 50%;
height: 100%;
overflow: hidden;
opacity: 0;
}
&-half &-first,
&-half &-second {
opacity: 1;
2016-03-30 13:20:03 +08:00
}
&-half &-first,
&-full &-second {
color: inherit;
2016-04-01 15:49:07 +08:00
}
2016-03-31 14:43:38 +08:00
}
2016-03-30 13:20:03 +08:00
2016-03-31 14:43:38 +08:00
&-text {
margin-left: 8px;
display: inline-block;
font-size: @font-size-base;
2016-03-30 13:20:03 +08:00
}
}