1 | @import '../../style/themes/index';
|
2 | @import '../../style/mixins/index';
|
3 |
|
4 | @rate-prefix-cls: ~'@{ant-prefix}-rate';
|
5 |
|
6 | .@{rate-prefix-cls} {
|
7 | .reset-component();
|
8 |
|
9 | display: inline-block;
|
10 | margin: 0;
|
11 | padding: 0;
|
12 | color: @rate-star-color;
|
13 | font-size: @rate-star-size;
|
14 | line-height: unset;
|
15 | list-style: none;
|
16 | outline: none;
|
17 |
|
18 | &-disabled &-star {
|
19 | cursor: default;
|
20 | &:hover {
|
21 | transform: scale(1);
|
22 | }
|
23 | }
|
24 |
|
25 | &-star {
|
26 | position: relative;
|
27 | display: inline-block;
|
28 | color: inherit;
|
29 | cursor: pointer;
|
30 |
|
31 | &:not(:last-child) {
|
32 | margin-right: 8px;
|
33 | }
|
34 |
|
35 | > div {
|
36 | transition: all 0.3s;
|
37 |
|
38 | &:hover,
|
39 | &:focus-visible {
|
40 | transform: @rate-star-hover-scale;
|
41 | }
|
42 |
|
43 | &:focus:not(:focus-visible) {
|
44 | outline: 0;
|
45 | }
|
46 | }
|
47 |
|
48 | &-first,
|
49 | &-second {
|
50 | color: @rate-star-bg;
|
51 | transition: all 0.3s;
|
52 | user-select: none;
|
53 | .@{iconfont-css-prefix} {
|
54 | vertical-align: middle;
|
55 | }
|
56 | }
|
57 |
|
58 | &-first {
|
59 | position: absolute;
|
60 | top: 0;
|
61 | left: 0;
|
62 | width: 50%;
|
63 | height: 100%;
|
64 | overflow: hidden;
|
65 | opacity: 0;
|
66 | }
|
67 |
|
68 | &-half &-first,
|
69 | &-half &-second {
|
70 | opacity: 1;
|
71 | }
|
72 |
|
73 | &-half &-first,
|
74 | &-full &-second {
|
75 | color: inherit;
|
76 | }
|
77 | }
|
78 |
|
79 | &-text {
|
80 | display: inline-block;
|
81 | margin: 0 8px;
|
82 | font-size: @font-size-base;
|
83 | }
|
84 | }
|
85 |
|
86 | @import './rtl';
|