_form-rating.scss
1.03 KB
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
.b-rating {
text-align: center;
&.d-inline-flex {
width: auto;
}
.b-rating-star,
.b-rating-value {
padding: 0 0.25em;
}
.b-rating-value {
// Keep the stars from moving when value changes (usually)
min-width: 2.5em;
}
.b-rating-star {
display: inline-flex;
justify-content: center;
outline: 0;
.b-rating-icon {
display: inline-flex;
transition: all 0.15s ease-in-out;
}
}
&.disabled,
&:disabled {
background-color: $input-disabled-bg;
color: $text-muted;
}
&:not(.disabled):not(.readonly) {
.b-rating-star {
cursor: pointer;
}
// Zoom focused or hovered icons
&:focus:not(:hover) .b-rating-star.focused,
.b-rating-star:hover {
.b-rating-icon {
transform: scale(1.5);
}
}
}
// Flip the half icon if RTL mode
// We transform the outer star wrapper so that we do not
// interfere with the hover/focus transform above
&[dir="rtl"] {
.b-rating-star-half {
transform: scale(-1, 1);
}
}
}