mod-base 1.0.5-beta.1 → 1.0.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-base",
3
- "version": "1.0.5-beta.1",
3
+ "version": "1.0.5-beta.2",
4
4
  "description": "Base Styles for S3 Sites",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,424 @@
1
+ $star-rating-height: 24px;
2
+ $star-rating-height-sm: 20px;
3
+ $star-rating-height-lg: 28px;
4
+
5
+ $rating-icons-folder: '../images/modstyle-icons' !default;
6
+
7
+ @mixin star-rating-sm {
8
+ .star-rating {
9
+ &__stars {
10
+ height: $star-rating-height-sm;
11
+ line-height: $star-rating-height-sm;
12
+
13
+ &::before,
14
+ &::after {
15
+ font-size: $star-rating-height-sm;
16
+ height: $star-rating-height-sm;
17
+ line-height: $star-rating-height-sm;
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ @mixin star-rating-lg {
24
+ height: $star-rating-height-lg;
25
+ line-height: $star-rating-height-lg;
26
+
27
+ .star-rating {
28
+ &__stars {
29
+ height: $star-rating-height-lg;
30
+ line-height: $star-rating-height-lg;
31
+
32
+ &::before,
33
+ &::after {
34
+ font-size: $star-rating-height-lg;
35
+ height: $star-rating-height-lg;
36
+ line-height: $star-rating-height-lg;
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ .star-rating {
43
+ display: inline-block;
44
+
45
+ > span {
46
+ vertical-align: middle;
47
+ }
48
+
49
+ &__stars {
50
+ display: inline-block;
51
+ height: $star-rating-height;
52
+ line-height: $star-rating-height;
53
+ margin-right: 5px;
54
+ position: relative;
55
+
56
+ &::before,
57
+ &::after {
58
+ @include icon-fill;
59
+ content: '\e907\e907\e907\e907\e907';
60
+ display: inline-block;
61
+ font-size: $star-rating-height;
62
+ height: $star-rating-height;
63
+ line-height: $star-rating-height;
64
+ overflow: hidden;
65
+ white-space: nowrap;
66
+ }
67
+
68
+ &::before {
69
+ color: $color-ivory5;
70
+ position: relative;
71
+ z-index: 1;
72
+ }
73
+
74
+ &::after {
75
+ color: $color-yellow5;
76
+ left: 0;
77
+ position: absolute;
78
+ top: 0;
79
+ z-index: 2;
80
+ width: 0;
81
+ }
82
+
83
+ &--00 {
84
+ &::before {
85
+ color: $color-ivory5;
86
+ font-size: $star-rating-height;
87
+ height: $star-rating-height;
88
+ line-height: $star-rating-height;
89
+ }
90
+
91
+ &::after {
92
+ display: none;
93
+ }
94
+ }
95
+
96
+ &--05 {
97
+ &::after {
98
+ width: 10%;
99
+ }
100
+ }
101
+
102
+ &--10 {
103
+ &::after {
104
+ width: 20%;
105
+ }
106
+ }
107
+
108
+ &--15 {
109
+ &::after {
110
+ width: 30%;
111
+ }
112
+ }
113
+
114
+ &--20 {
115
+ &::after {
116
+ width: 40%;
117
+ }
118
+ }
119
+
120
+ &--25 {
121
+ &::after {
122
+ width: 50%;
123
+ }
124
+ }
125
+
126
+ &--30 {
127
+ &::after {
128
+ width: 60%;
129
+ }
130
+ }
131
+
132
+ &--35 {
133
+ &::after {
134
+ width: 70%;
135
+ }
136
+ }
137
+
138
+ &--40 {
139
+ &::after {
140
+ width: 80%;
141
+ }
142
+ }
143
+
144
+ &--45 {
145
+ &::after {
146
+ width: 90%;
147
+ }
148
+ }
149
+
150
+ &--50 {
151
+ &::after {
152
+ width: 100%;
153
+ }
154
+ }
155
+ }
156
+
157
+ &__label {
158
+ @include font-primary-bold;
159
+ color: $color-charcoal5;
160
+ display: inline-block;
161
+ font-size: .75rem;
162
+ line-height: 1.3;
163
+ transition: color $trans-func $trans-time;
164
+ white-space: nowrap;
165
+
166
+ &--verified {
167
+ color: $color-orange5;
168
+ font-size: .875rem;
169
+ line-height: 1.3;
170
+ }
171
+
172
+ &--text {
173
+ @include font-primary-regular;
174
+ color: $color-charcoal4;
175
+ font-size: .875rem;
176
+ line-height: 1.3;
177
+ }
178
+ }
179
+
180
+ &--lg {
181
+ @include star-rating-lg;
182
+ }
183
+
184
+ &--sm {
185
+ @include star-rating-sm;
186
+ }
187
+ }
188
+
189
+ a {
190
+ &.star-rating {
191
+ &:hover,
192
+ &:focus,
193
+ &:active {
194
+ .star-rating {
195
+ &__label {
196
+ color: $color-charcoal6;
197
+
198
+ &--verified {
199
+ color: $color-orange6;
200
+ }
201
+
202
+ &--text {
203
+ color: $color-charcoal5;
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+
211
+ /**
212
+ * External ratings
213
+ */
214
+ .ext-rating-icon {
215
+ @include font-primary-bold;
216
+ border: 1px solid $color-charcoal1;
217
+ border-radius: 16px;
218
+ color: $color-charcoal5;
219
+ display: inline-block;
220
+ font-size: 1.0625rem;
221
+ line-height: 20px;
222
+ padding: 5px 10px;
223
+ transition: border-color $trans-time $trans-func;
224
+
225
+ &--google,
226
+ &--bbb,
227
+ &--trustpilot {
228
+ background-position: 10px 50%;
229
+ background-repeat: no-repeat;
230
+ padding-left: 30px;
231
+ }
232
+
233
+ &--google {
234
+ background-image: url('#{$rating-icons-folder}/google.svg');
235
+ background-size: 14px 14px;
236
+ }
237
+
238
+ &--bbb {
239
+ background-image: url('#{$rating-icons-folder}/bbb.svg');
240
+ background-position: 8px 50%;
241
+ background-size: 22px 22px;
242
+ }
243
+
244
+ &--trustpilot {
245
+ background-image: url('#{$rating-icons-folder}/trustpilot.svg');
246
+ background-position: 8px 50%;
247
+ background-size: 20px 20px;
248
+ }
249
+ }
250
+
251
+ @include breakpoint-phone {
252
+ .ext-rating-icon {
253
+ &--trustpilot {
254
+ background-size: 14px 14px;
255
+ padding-left: 26px;
256
+ }
257
+ }
258
+ }
259
+
260
+ a {
261
+ &.ext-rating-icon {
262
+ &:focus,
263
+ &:hover,
264
+ &:active {
265
+ border-color: $color-charcoal2;
266
+ color: $color-charcoal5;
267
+ }
268
+ }
269
+ }
270
+
271
+ /**
272
+ * Ratings set
273
+ */
274
+ .ratings-set {
275
+ margin: 0 0 15px;
276
+
277
+ &__group {
278
+ font-size: 0;
279
+
280
+ & + & {
281
+ margin-top: 10px;
282
+ }
283
+
284
+ .ext-rating-icon {
285
+ + .ext-rating-icon {
286
+ margin-left: 9px;
287
+ }
288
+ }
289
+ }
290
+ }
291
+
292
+ /**
293
+ * Large rating icons
294
+ */
295
+ @mixin large-rating-icon-vertical-layout {
296
+ font-size: 1.25rem;
297
+ height: 65px;
298
+ line-height: 20px;
299
+ min-width: 40px;
300
+ padding: 45px 0 0;
301
+ text-align: center;
302
+ white-space: nowrap;
303
+
304
+ &::before {
305
+ left: 50%;
306
+ margin-left: -20px;
307
+ top: 0;
308
+ }
309
+ }
310
+
311
+ .large-rating-icon {
312
+ @include font-primary-bold;
313
+ color: $color-charcoal5;
314
+ display: inline-block;
315
+ font-size: 1.75rem;
316
+ height: 40px;
317
+ line-height: 40px;
318
+ padding-left: 45px;
319
+ position: relative;
320
+
321
+ &::before {
322
+ @include icon-fill;
323
+ color: $color-yellow5;
324
+ content: '\e907';
325
+ font-size: 2.5rem;
326
+ height: 40px;
327
+ left: 0;
328
+ line-height: 40px;
329
+ position: absolute;
330
+ top: 0;
331
+ width: 40px;
332
+ }
333
+
334
+ &::after {
335
+ @include font-primary-regular;
336
+ color: $color-charcoal4;
337
+ content: '/ 5';
338
+ display: inline-block;
339
+ font-size: .9375rem;
340
+ vertical-align: middle;
341
+ }
342
+
343
+ &--empty-star {
344
+ color: $color-charcoal1;
345
+
346
+ &::before {
347
+ @include icon-stroke;
348
+ color: $color-ivory5;
349
+ content: '\e908';
350
+ font-size: 2.5rem;
351
+ }
352
+ }
353
+
354
+ &--google {
355
+ &::before {
356
+ background-image: url('#{$rating-icons-folder}/google.svg');
357
+ background-position: center center;
358
+ background-repeat: no-repeat;
359
+ background-size: 28px 28px;
360
+ content: '';
361
+ }
362
+ }
363
+
364
+ &--trustpilot {
365
+ &::before {
366
+ background-image: url('#{$rating-icons-folder}/trustpilot.svg');
367
+ background-position: center center;
368
+ background-repeat: no-repeat;
369
+ background-size: 28px 28px;
370
+ content: '';
371
+ }
372
+ }
373
+
374
+ &--bbb {
375
+ &::before {
376
+ background-image: url('#{$rating-icons-folder}/bbb.svg');
377
+ background-position: center center;
378
+ background-repeat: no-repeat;
379
+ background-size: 38px 38px;
380
+ content: '';
381
+ }
382
+
383
+ &::after {
384
+ display: none;
385
+ }
386
+ }
387
+ }
388
+
389
+ @include breakpoint-phone {
390
+ .large-rating-icon {
391
+ @include large-rating-icon-vertical-layout;
392
+ }
393
+ }
394
+
395
+ /**
396
+ * Large rating icons set
397
+ */
398
+ .large-rating-icon-set {
399
+ display: flex;
400
+ flex-wrap: wrap;
401
+
402
+ &__item {
403
+ flex: 1;
404
+ max-width: 165px;
405
+ min-width: 130px;
406
+ padding: 20px 0;
407
+
408
+ &--large {
409
+ max-width: 100%;
410
+ min-width: 300px;
411
+ padding: 0;
412
+ }
413
+ }
414
+ }
415
+
416
+ @include breakpoint-phone {
417
+ .large-rating-icon-set {
418
+ &__item {
419
+ &:not(.large-rating-icon-set__item--large) {
420
+ min-width: 70px;
421
+ }
422
+ }
423
+ }
424
+ }
@@ -6,4 +6,5 @@
6
6
  @import 'flex';
7
7
  @import 'fonts';
8
8
  @import 'grid';
9
+ @import 'ratings';
9
10
  @import 'variables';