Blame view

src/styles/components/rate.less 2.48 KB
49d380cf   梁灏   init Rate component
1
2
3
4
5
6
7
8
9
10
  @rate-prefix-cls: ~"@{css-prefix}rate";
  
  .@{rate-prefix-cls} {
      display: inline-block;
      margin: 0;
      padding: 0;
      font-size: 20px;
      vertical-align: middle;
      font-weight: normal;
      font-style: normal;
49d380cf   梁灏   init Rate component
11
12
13
14
15
16
17
18
19
20
21
  
      &-disabled &-star {
          &:before,
          &-content:before {
              cursor: default;
          }
          &:hover {
              transform: scale(1);
          }
      }
  
552408d5   wqzwh   feature: rate组件增加...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
      &-star-full, &-star-zero {
          position: relative;
      }
      &-star-first {
          position: absolute;
          left: 0;
          top: 0;
          width: 50%;
          height: 100%;
          overflow: hidden;
          opacity: 0;
      }
  
      &-star-first, &-star-second {
          user-select: none;
          transition: all .3s ease;
          color: #e9e9e9;
b9ecbd53   梁灏   update Rate #3853
39
          cursor: pointer;
552408d5   wqzwh   feature: rate组件增加...
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
      }
  
      &-star-chart {
          display: inline-block;
          margin: 0;
          padding: 0;
          margin-right: 8px;
          position: relative;
          font-family: 'Ionicons';
          transition: all 0.3s ease;
  
          &:hover {
              transform: scale(1.1);
  
              &-star-first, &-star-second {
                  color: @rate-star-color;
              }
          }
      }
      &-star-chart&-star-full &-star-first, &-star-chart&-star-full &-star-second{
          color: @rate-star-color;
      }
      &-star-chart&-star-half &-star-first{
          opacity: 1;
          color: @rate-star-color;
      }
      
49d380cf   梁灏   init Rate component
67
68
69
70
71
72
      &-star {
          display: inline-block;
          margin: 0;
          padding: 0;
          margin-right: 8px;
          position: relative;
e5ac7925   梁灏   update Rate
73
          font-family: 'Ionicons';
49d380cf   梁灏   init Rate component
74
75
76
77
78
79
80
81
82
83
          transition: all 0.3s ease;
  
          &:hover {
              transform: scale(1.1);
          }
  
          &:before,
          &-content:before {
              color: #e9e9e9;
              cursor: pointer;
ca69e094   梁灏   update icons
84
              content: "\F2BF";
49d380cf   梁灏   init Rate component
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
              transition: all @transition-time @ease-in-out;
              display: block;
          }
  
          &-content {
              position: absolute;
              left: 0;
              top: 0;
              width: 50%;
              height: 100%;
              overflow: hidden;
              &:before {
                  color: transparent;
              }
          }
  
          &-half &-content:before,
          &-full:before {
              color: @rate-star-color;
          }
  
          &-half:hover &-content:before,
          &-full:hover:before {
              color: tint(@rate-star-color, 20%);
          }
      }
e5ac7925   梁灏   update Rate
111
112
113
114
115
116
      &-text {
          margin-left: 8px;
          vertical-align: middle;
          display: inline-block;
          font-size: @font-size-small;
      }
49d380cf   梁灏   init Rate component
117
  }