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

82 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-12-07 20:02:01 +08:00
@import '../../style/themes/default';
@import '../../style/mixins/index';
2018-12-07 20:02:01 +08:00
@rate-prefix-cls: ~'@{ant-prefix}-rate';
2016-03-30 13:20:03 +08:00
.@{rate-prefix-cls} {
.reset-component;
display: inline-block;
2016-03-30 13:20:03 +08:00
margin: 0;
padding: 0;
color: @rate-star-color;
font-size: 20px;
line-height: unset;
list-style: none;
2017-11-28 10:48:58 +08:00
outline: none;
2016-03-30 13:20:03 +08:00
2016-03-31 14:43:38 +08:00
&-disabled &-star {
cursor: default;
2016-03-31 14:43:38 +08:00
&:hover {
transform: scale(1);
}
2016-03-30 13:20:03 +08:00
}
&-star {
position: relative;
2016-03-30 13:20:03 +08:00
display: inline-block;
margin: 0;
2016-03-31 14:43:38 +08:00
margin-right: 8px;
padding: 0;
color: inherit;
cursor: pointer;
transition: all 0.3s;
2016-03-31 14:43:38 +08:00
2018-12-28 16:04:05 +08:00
> div {
&:focus {
outline: 0;
}
&:hover,
&:focus {
transform: scale(1.1);
}
}
&-first,
&-second {
color: @rate-star-bg;
transition: all 0.3s;
user-select: none;
2018-09-03 17:11:20 +08:00
.@{iconfont-css-prefix} {
vertical-align: middle;
}
2016-03-31 14:43:38 +08:00
}
&-first {
2016-03-30 13:20:03 +08:00
position: absolute;
top: 0;
left: 0;
2016-03-30 13:20:03 +08:00
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 {
display: inline-block;
margin-left: 8px;
2016-03-31 14:43:38 +08:00
font-size: @font-size-base;
2016-03-30 13:20:03 +08:00
}
}