@transfermarkt/global-styles 1.25.5 → 1.27.0
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/README.md
CHANGED
|
@@ -11,6 +11,7 @@ npm i @transfermarkt/global-styles
|
|
|
11
11
|
To use the stylelint config you have to edit your package.json
|
|
12
12
|
|
|
13
13
|
### package.json
|
|
14
|
+
|
|
14
15
|
```
|
|
15
16
|
"stylelint": {"extends": "./node_modules/@transfermarkt/global-styles/config/stylelint/index.js"}
|
|
16
17
|
```
|
|
@@ -54,61 +55,76 @@ Maybe you have to specify the path with the node_modules folder
|
|
|
54
55
|
## Functions
|
|
55
56
|
|
|
56
57
|
1. ### rem-calc
|
|
58
|
+
|
|
57
59
|
#### Description
|
|
60
|
+
|
|
58
61
|
Converts one or more pixel values into matching rem values.
|
|
59
62
|
One or more values to convert. Be sure to separate them with spaces and not commas.
|
|
60
63
|
Based on 16px.
|
|
64
|
+
|
|
61
65
|
#### Usage
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
```
|
|
68
|
+
.class {
|
|
69
|
+
font-size: rem-calc(12);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
68
72
|
|
|
69
73
|
#### Functionality
|
|
74
|
+
|
|
70
75
|
Returns a list of converted values.
|
|
71
76
|
|
|
72
77
|
2. ### strip-unit
|
|
73
78
|
|
|
74
79
|
#### Description
|
|
80
|
+
|
|
75
81
|
The `strip-unit` function in SCSS is designed to remove the unit from a numerical value, returning just the numeric
|
|
76
82
|
part. This is particularly useful when you need to perform calculations or operations that require unitless numbers.
|
|
77
83
|
|
|
78
84
|
#### Functionality
|
|
85
|
+
|
|
79
86
|
Checks if the provided value is a number with a unit. If so, it strips off the unit by dividing the number by 1,
|
|
80
87
|
effectively retaining only the numeric value. If the input is already a unitless number or not a number, it returns
|
|
81
88
|
the value as is.
|
|
82
89
|
|
|
83
90
|
#### Use Case
|
|
91
|
+
|
|
84
92
|
Ideal for responsive designs and calculations where units (like px, em, rem) need to be removed from measurements to
|
|
85
93
|
perform arithmetic or logical operations.
|
|
86
94
|
|
|
87
95
|
3. ### tm-color
|
|
96
|
+
|
|
88
97
|
#### Description & Functionality
|
|
98
|
+
|
|
89
99
|
Returns the HEX value of a specific color.
|
|
90
100
|
|
|
91
101
|
#### Usage
|
|
102
|
+
|
|
92
103
|
```
|
|
93
104
|
.class {
|
|
94
105
|
color: tm-color(gun-powder);
|
|
95
106
|
}
|
|
96
107
|
```
|
|
108
|
+
|
|
97
109
|
4. ### tm-font
|
|
110
|
+
|
|
98
111
|
#### Description
|
|
112
|
+
|
|
99
113
|
Returns a font set of the given name -> see font variables for available sets.
|
|
114
|
+
|
|
100
115
|
#### Usage
|
|
116
|
+
|
|
101
117
|
```
|
|
102
118
|
.class {
|
|
103
119
|
font-family: tm-font('septenary');
|
|
104
120
|
}
|
|
105
121
|
```
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
|
|
123
|
+
**Warning:** Using tm-font with 'primary' is deprecated!
|
|
108
124
|
|
|
109
125
|
5. ### zf-to-rem
|
|
110
126
|
#### Description
|
|
111
|
-
Converts a pixel value to matching rem value.
|
|
127
|
+
Converts a pixel value to matching rem value. _Any_ value passed, regardless of unit, is assumed to be a pixel
|
|
112
128
|
value. By default, the base pixel value used to calculate the rem value is taken from the `$global-font-size`
|
|
113
129
|
variable.
|
|
114
130
|
|
package/package.json
CHANGED
|
@@ -115,9 +115,11 @@
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
@media (hover: hover) {
|
|
119
|
+
&:hover {
|
|
120
|
+
background-color: tm-color('dark-blue-new');
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
}
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
&--disabled {
|
|
@@ -129,9 +131,11 @@
|
|
|
129
131
|
background-color: tm-color('warning-light-new');
|
|
130
132
|
color: tm-color('warning-new');
|
|
131
133
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
@media (hover: hover) {
|
|
135
|
+
&:hover {
|
|
136
|
+
background-color: tm-color('warning-new');
|
|
137
|
+
color: tm-color('warning-light-new');
|
|
138
|
+
}
|
|
135
139
|
}
|
|
136
140
|
}
|
|
137
141
|
|
|
@@ -139,9 +143,11 @@
|
|
|
139
143
|
background-color: tm-color('success-light');
|
|
140
144
|
color: tm-color('success');
|
|
141
145
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
@media (hover: hover) {
|
|
147
|
+
&:hover {
|
|
148
|
+
background-color: tm-color('success-dark');
|
|
149
|
+
color: tm-color('success-light');
|
|
150
|
+
}
|
|
145
151
|
}
|
|
146
152
|
}
|
|
147
153
|
}
|
|
@@ -163,18 +169,22 @@
|
|
|
163
169
|
font-size: $font-size-small;
|
|
164
170
|
}
|
|
165
171
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
@media (hover: hover) {
|
|
173
|
+
&:hover {
|
|
174
|
+
border: 1px solid;
|
|
175
|
+
color: tm-color('dark-blue-new');
|
|
176
|
+
text-decoration: none;
|
|
177
|
+
}
|
|
170
178
|
}
|
|
171
179
|
|
|
172
180
|
&--disabled {
|
|
173
181
|
border: 1px solid;
|
|
174
182
|
color: tm-color('soft-sky');
|
|
175
183
|
|
|
176
|
-
|
|
177
|
-
|
|
184
|
+
@media (hover: hover) {
|
|
185
|
+
&:hover {
|
|
186
|
+
color: tm-color('soft-sky');
|
|
187
|
+
}
|
|
178
188
|
}
|
|
179
189
|
}
|
|
180
190
|
|
|
@@ -182,8 +192,10 @@
|
|
|
182
192
|
border: 1px solid tm-color('warning-new');
|
|
183
193
|
color: tm-color('warning-new');
|
|
184
194
|
|
|
185
|
-
|
|
186
|
-
|
|
195
|
+
@media (hover: hover) {
|
|
196
|
+
&:hover {
|
|
197
|
+
color: tm-color('warning-dark-new');
|
|
198
|
+
}
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
201
|
|
|
@@ -191,8 +203,10 @@
|
|
|
191
203
|
border: 1px solid tm-color('success-dark');
|
|
192
204
|
color: tm-color('success-dark');
|
|
193
205
|
|
|
194
|
-
|
|
195
|
-
|
|
206
|
+
@media (hover: hover) {
|
|
207
|
+
&:hover {
|
|
208
|
+
color: tm-color('success');
|
|
209
|
+
}
|
|
196
210
|
}
|
|
197
211
|
}
|
|
198
212
|
|
|
@@ -218,19 +232,23 @@
|
|
|
218
232
|
font-size: $font-size-small;
|
|
219
233
|
}
|
|
220
234
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
235
|
+
@media (hover: hover) {
|
|
236
|
+
&:hover {
|
|
237
|
+
border: 1px solid tm-color('grey-new');
|
|
238
|
+
color: tm-color('admiral');
|
|
239
|
+
text-decoration: none;
|
|
240
|
+
}
|
|
225
241
|
}
|
|
226
242
|
|
|
227
243
|
&--disabled {
|
|
228
244
|
border: 1px solid tm-color('silver-mist');
|
|
229
245
|
color: tm-color('silver-mist');
|
|
230
246
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
247
|
+
@media (hover: hover) {
|
|
248
|
+
&:hover {
|
|
249
|
+
border: 1px solid tm-color('silver-mist');
|
|
250
|
+
color: tm-color('silver-mist');
|
|
251
|
+
}
|
|
234
252
|
}
|
|
235
253
|
}
|
|
236
254
|
}
|
|
@@ -251,32 +269,40 @@
|
|
|
251
269
|
font-size: $font-size-small;
|
|
252
270
|
}
|
|
253
271
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
272
|
+
@media (hover: hover) {
|
|
273
|
+
&:hover {
|
|
274
|
+
color: tm-color('dark-blue-new');
|
|
275
|
+
text-decoration: none;
|
|
276
|
+
}
|
|
257
277
|
}
|
|
258
278
|
|
|
259
279
|
&--disabled {
|
|
260
280
|
color: tm-color('soft-sky');
|
|
261
281
|
|
|
262
|
-
|
|
263
|
-
|
|
282
|
+
@media (hover: hover) {
|
|
283
|
+
&:hover {
|
|
284
|
+
color: tm-color('soft-sky');
|
|
285
|
+
}
|
|
264
286
|
}
|
|
265
287
|
}
|
|
266
288
|
|
|
267
289
|
&--warning {
|
|
268
290
|
color: tm-color('warning-new');
|
|
269
291
|
|
|
270
|
-
|
|
271
|
-
|
|
292
|
+
@media (hover: hover) {
|
|
293
|
+
&:hover {
|
|
294
|
+
color: tm-color('warning-dark-new');
|
|
295
|
+
}
|
|
272
296
|
}
|
|
273
297
|
}
|
|
274
298
|
|
|
275
299
|
&--success {
|
|
276
300
|
color: tm-color('success-dark');
|
|
277
301
|
|
|
278
|
-
|
|
279
|
-
|
|
302
|
+
@media (hover: hover) {
|
|
303
|
+
&:hover {
|
|
304
|
+
color: tm-color('success');
|
|
305
|
+
}
|
|
280
306
|
}
|
|
281
307
|
}
|
|
282
308
|
}
|
|
@@ -297,16 +323,20 @@
|
|
|
297
323
|
font-size: $font-size-small;
|
|
298
324
|
}
|
|
299
325
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
326
|
+
@media (hover: hover) {
|
|
327
|
+
&:hover {
|
|
328
|
+
color: tm-color('dark-blue-new');
|
|
329
|
+
text-decoration: none;
|
|
330
|
+
}
|
|
303
331
|
}
|
|
304
332
|
|
|
305
333
|
&--disabled {
|
|
306
334
|
color: tm-color('soft-sky');
|
|
307
335
|
|
|
308
|
-
|
|
309
|
-
|
|
336
|
+
@media (hover: hover) {
|
|
337
|
+
&:hover {
|
|
338
|
+
color: tm-color('soft-sky');
|
|
339
|
+
}
|
|
310
340
|
}
|
|
311
341
|
}
|
|
312
342
|
}
|
|
@@ -327,16 +357,20 @@
|
|
|
327
357
|
font-size: $font-size-small;
|
|
328
358
|
}
|
|
329
359
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
360
|
+
@media (hover: hover) {
|
|
361
|
+
&:hover {
|
|
362
|
+
color: tm-color('admiral');
|
|
363
|
+
text-decoration: none;
|
|
364
|
+
}
|
|
333
365
|
}
|
|
334
366
|
|
|
335
367
|
&--disabled {
|
|
336
368
|
color: tm-color('silver-mist');
|
|
337
369
|
|
|
338
|
-
|
|
339
|
-
|
|
370
|
+
@media (hover: hover) {
|
|
371
|
+
&:hover {
|
|
372
|
+
color: tm-color('silver-mist');
|
|
373
|
+
}
|
|
340
374
|
}
|
|
341
375
|
}
|
|
342
376
|
}
|
|
@@ -383,9 +417,11 @@
|
|
|
383
417
|
transform: rotate(180deg);
|
|
384
418
|
}
|
|
385
419
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
420
|
+
@media (hover: hover) {
|
|
421
|
+
&:hover {
|
|
422
|
+
@include tm-icon-color('lightblue-light');
|
|
423
|
+
}
|
|
424
|
+
}
|
|
389
425
|
}
|
|
390
426
|
|
|
391
427
|
&__arrow-right {
|
|
@@ -412,8 +448,10 @@
|
|
|
412
448
|
stroke-width: 1.2;
|
|
413
449
|
}
|
|
414
450
|
|
|
415
|
-
|
|
416
|
-
|
|
451
|
+
@media (hover: hover) {
|
|
452
|
+
&:hover {
|
|
453
|
+
@include tm-icon-color('lightblue-light');
|
|
454
|
+
}
|
|
417
455
|
}
|
|
418
456
|
}
|
|
419
457
|
|
|
@@ -443,8 +481,10 @@
|
|
|
443
481
|
transform: rotate(180deg);
|
|
444
482
|
}
|
|
445
483
|
|
|
446
|
-
|
|
447
|
-
|
|
484
|
+
@media (hover: hover) {
|
|
485
|
+
&:hover {
|
|
486
|
+
@include tm-icon-color('lightblue-light');
|
|
487
|
+
}
|
|
448
488
|
}
|
|
449
489
|
}
|
|
450
490
|
|
|
@@ -1863,8 +1903,10 @@
|
|
|
1863
1903
|
&__admiral {
|
|
1864
1904
|
@include tm-icon-color(admiral);
|
|
1865
1905
|
|
|
1866
|
-
|
|
1867
|
-
|
|
1906
|
+
@media (hover: hover) {
|
|
1907
|
+
&:hover {
|
|
1908
|
+
@include tm-icon-color(lightblue-light);
|
|
1909
|
+
}
|
|
1868
1910
|
}
|
|
1869
1911
|
}
|
|
1870
1912
|
|
|
@@ -1879,32 +1921,40 @@
|
|
|
1879
1921
|
&__warning-dark {
|
|
1880
1922
|
@include tm-icon-color(warning-dark);
|
|
1881
1923
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1924
|
+
@media (hover: hover) {
|
|
1925
|
+
&:hover {
|
|
1926
|
+
@include tm-icon-color(white);
|
|
1927
|
+
}
|
|
1884
1928
|
}
|
|
1885
1929
|
}
|
|
1886
1930
|
|
|
1887
1931
|
&__warning {
|
|
1888
1932
|
@include tm-icon-color(warning-dark);
|
|
1889
1933
|
|
|
1890
|
-
|
|
1891
|
-
|
|
1934
|
+
@media (hover: hover) {
|
|
1935
|
+
&:hover {
|
|
1936
|
+
@include tm-icon-color(warning);
|
|
1937
|
+
}
|
|
1892
1938
|
}
|
|
1893
1939
|
}
|
|
1894
1940
|
|
|
1895
1941
|
&__success {
|
|
1896
1942
|
@include tm-icon-color(success);
|
|
1897
1943
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1944
|
+
@media (hover: hover) {
|
|
1945
|
+
&:hover {
|
|
1946
|
+
@include tm-icon-color(success-light);
|
|
1947
|
+
}
|
|
1900
1948
|
}
|
|
1901
1949
|
}
|
|
1902
1950
|
|
|
1903
1951
|
&__success-dark {
|
|
1904
1952
|
@include tm-icon-color(success-dark);
|
|
1905
1953
|
|
|
1906
|
-
|
|
1907
|
-
|
|
1954
|
+
@media (hover: hover) {
|
|
1955
|
+
&:hover {
|
|
1956
|
+
@include tm-icon-color(success);
|
|
1957
|
+
}
|
|
1908
1958
|
}
|
|
1909
1959
|
}
|
|
1910
1960
|
|
|
@@ -1915,8 +1965,10 @@
|
|
|
1915
1965
|
&__inverted {
|
|
1916
1966
|
@include tm-icon-color(white);
|
|
1917
1967
|
|
|
1918
|
-
|
|
1919
|
-
|
|
1968
|
+
@media (hover: hover) {
|
|
1969
|
+
&:hover {
|
|
1970
|
+
@include tm-icon-color(lightblue-light);
|
|
1971
|
+
}
|
|
1920
1972
|
}
|
|
1921
1973
|
}
|
|
1922
1974
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward 'infos-cards';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@use '../../../functions/rem-calc' as *;
|
|
2
|
+
@use '../../../functions/tm-color' as *;
|
|
3
|
+
@use '../../../functions/tm-font' as *;
|
|
4
|
+
@use '../../../mixins/breakpoint' as *;
|
|
5
|
+
@use '../../../mixins/icon' as *;
|
|
6
|
+
|
|
7
|
+
.info-card__info {
|
|
8
|
+
border-radius: rem-calc(8);
|
|
9
|
+
padding: rem-calc(12) rem-calc(16);
|
|
10
|
+
|
|
11
|
+
&-text {
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
display: flex;
|
|
14
|
+
font-family: tm-font('septenary');
|
|
15
|
+
font-size: rem-calc(16);
|
|
16
|
+
font-variation-settings: 'wght' 400;
|
|
17
|
+
font-weight: initial;
|
|
18
|
+
gap: rem-calc(8);
|
|
19
|
+
line-height: rem-calc(24);
|
|
20
|
+
margin: 0;
|
|
21
|
+
|
|
22
|
+
@include breakpoint(laptop) {
|
|
23
|
+
font-size: rem-calc(14);
|
|
24
|
+
line-height: rem-calc(22);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&::before {
|
|
28
|
+
background-color: currentColor; /* stylelint-disable-line value-keyword-case */
|
|
29
|
+
content: '';
|
|
30
|
+
flex: 0 0 rem-calc(20);
|
|
31
|
+
height: rem-calc(20);
|
|
32
|
+
margin-top: rem-calc(2);
|
|
33
|
+
mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
|
|
34
|
+
mask-size: contain;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--alert {
|
|
39
|
+
background-color: tm-color('warning-light-new');
|
|
40
|
+
color: tm-color('warning-new');
|
|
41
|
+
|
|
42
|
+
.info-card__info-text::before {
|
|
43
|
+
background-color: tm-color('warning-dark-new');
|
|
44
|
+
mask: url('https://tmsi.akamaized.net/tm-svg-icons/attention.svg') no-repeat center;
|
|
45
|
+
mask-size: contain;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--blue {
|
|
50
|
+
background-color: tm-color('alice-blue');
|
|
51
|
+
color: tm-color('slate-blue');
|
|
52
|
+
|
|
53
|
+
.info-card__info-text::before {
|
|
54
|
+
background-color: tm-color('slate-blue');
|
|
55
|
+
mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
|
|
56
|
+
mask-size: contain;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--blue-new {
|
|
61
|
+
background-color: tm-color('alice-blue');
|
|
62
|
+
color: tm-color('admiral');
|
|
63
|
+
|
|
64
|
+
.info-card__info-text::before {
|
|
65
|
+
background-color: tm-color('light-blue-new');
|
|
66
|
+
mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
|
|
67
|
+
mask-size: contain;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--success {
|
|
72
|
+
background-color: tm-color('success-light');
|
|
73
|
+
color: tm-color('success-dark');
|
|
74
|
+
|
|
75
|
+
.info-card__info-text::before {
|
|
76
|
+
background-color: tm-color('success-dark');
|
|
77
|
+
mask: url('https://tmsi.akamaized.net/tm-svg-icons/success-check.svg') no-repeat center;
|
|
78
|
+
mask-size: contain;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--border {
|
|
83
|
+
background-color: tm-color('white');
|
|
84
|
+
border: rem-calc(1) solid tm-color('silver-mist');
|
|
85
|
+
color: tm-color('admiral');
|
|
86
|
+
|
|
87
|
+
.info-card__info-text::before {
|
|
88
|
+
background-color: tm-color('ash-grey');
|
|
89
|
+
|
|
90
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
91
|
+
-webkit-mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
|
|
92
|
+
mask: url('https://tmsi.akamaized.net/tm-svg-icons/info.svg') no-repeat center;
|
|
93
|
+
|
|
94
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
95
|
+
-webkit-mask-size: contain;
|
|
96
|
+
mask-size: contain;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -140,6 +140,8 @@ $tm-colors: (
|
|
|
140
140
|
'brand-youtube': #f2342c,
|
|
141
141
|
'brand-rss': #f60,
|
|
142
142
|
'brand-community': #1d75a3,
|
|
143
|
-
'brand-wahretabelle': #429535
|
|
143
|
+
'brand-wahretabelle': #429535,
|
|
144
|
+
// new colors to discuss
|
|
145
|
+
'slate-blue': #4c5e78,
|
|
146
|
+
'ash-grey': #6b7280
|
|
144
147
|
);
|
|
145
|
-
|