forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.scss
159 lines (131 loc) · 3.53 KB
/
main.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
@import "../core/index-noreset";
@import "scss/variable";
@import "scss/mixin";
@import "./rtl.scss";
#{$rating-prefix} {
vertical-align: top;
& {
display: inline-block;
position: relative;
}
&:after {
visibility: hidden;
display: block;
height: 0;
font-size: 0;
content: '\0020';
clear: both;
}
&-base {
float: left;
}
&-text {
float: left;
}
&-base-disabled {
cursor: not-allowed;
}
&-underlay {
white-space: nowrap;
overflow: hidden;
@include rating-state($rating-normal-underlay-color);
}
&-stroke-mode &-underlay {
#{$rating-icon-prefix} {
color: $color-transparent;
-webkit-text-stroke: 1px $rating-normal-overlay-color;
}
}
&-overlay {
white-space: nowrap;
overflow: hidden;
position: absolute;
width: 0;
top: 0;
left: 0;
@include rating-state($rating-normal-overlay-color);
}
&-underlay,
&-overlay {
#{$rating-prefix}-icon {
cursor: pointer;
margin-left: $s-1;
}
#{$rating-prefix}-icon:last-child {
/* icon 放大会产生边缘溢出,这里使用 margin 为放大扩展一部分空间 */
margin-right: $s-1;
}
#{$rating-icon-prefix} {
transition: all $motion-duration-immediately $motion-linear;
&.hover {
transform: scale3d(1.1, 1.1, 1.1);
}
&.clicked {
transform: scale3d(.9, .9, .9);
}
}
}
&-info {
position: absolute;
top: calc(100% + #{$s-1});
left: 0;
border: 1px solid $color-fill1-4;
background: $color-white;
padding: 4px 8px 3px;
font-size: 12px;
white-space: nowrap;
&:after {
position: absolute;
content: '';
width: 4px;
height: 4px;
transform: rotate(45deg);
border: 1px solid $color-fill1-4;
background: $color-white;
border-bottom-color: transparent;
border-right-color: transparent;
top: -3px;
left: 4px;
}
}
&:focus,
&.hover {
outline: none;
#{$rating-prefix}-overlay {
@include rating-state($rating-normal-overlay-hover-color);
}
}
}
/* 状态 */
/* ======================================== */
#{$rating-prefix}-grade-low {
#{$rating-prefix}-overlay {
@include rating-state($rating-grade-low-overlay-color);
}
&.hover {
#{$rating-prefix}-overlay {
@include rating-state($rating-grade-low-overlay-color);
}
}
}
#{$rating-prefix}-grade-high {
#{$rating-prefix}-overlay {
@include rating-state($rating-grade-high-overlay-color);
}
&.hover {
#{$rating-prefix}-overlay {
@include rating-state($rating-grade-high-overlay-hover-color);
}
}
}
/* 尺寸 */
/* ======================================== */
#{$rating-prefix}-small {
@include rating-size($rating-small-icon-size, $rating-small-font-size, $rating-small-text-margin-left);
}
#{$rating-prefix}-medium {
@include rating-size($rating-medium-icon-size, $rating-medium-font-size, $rating-medium-text-margin-left);
}
#{$rating-prefix}-large {
@include rating-size($rating-large-icon-size, $rating-large-font-size, $rating-large-text-margin-left);
}