@transfermarkt/global-styles 1.25.4 → 1.26.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
- .class {
65
- font-size: rem-calc(12);
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
- **Warning:** Using tm-font with 'primary' is deprecated!
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. *Any* value passed, regardless of unit, is assumed to be a pixel
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transfermarkt/global-styles",
3
- "version": "1.25.4",
3
+ "version": "1.26.0",
4
4
  "description": "Shared styles and Global configuration for stylelint rules of the Transfermarkt projects",
5
5
  "author": "Transfermarkt",
6
6
  "license": "MIT",
@@ -115,9 +115,11 @@
115
115
  }
116
116
  }
117
117
 
118
- &:hover {
119
- background-color: tm-color('dark-blue-new');
120
- text-decoration: none;
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
- &:hover {
133
- background-color: tm-color('warning-new');
134
- color: tm-color('warning-light-new');
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
- &:hover {
143
- background-color: tm-color('success-dark');
144
- color: tm-color('success-light');
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
- &:hover {
167
- border: 1px solid;
168
- color: tm-color('dark-blue-new');
169
- text-decoration: none;
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
- &:hover {
177
- color: tm-color('soft-sky');
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
- &:hover {
186
- color: tm-color('warning-dark-new');
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
- &:hover {
195
- color: tm-color('success');
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
- &:hover {
222
- border: 1px solid tm-color('grey-new');
223
- color: tm-color('admiral');
224
- text-decoration: none;
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
- &:hover {
232
- border: 1px solid tm-color('silver-mist');
233
- color: tm-color('silver-mist');
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
- &:hover {
255
- color: tm-color('dark-blue-new');
256
- text-decoration: none;
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
- &:hover {
263
- color: tm-color('soft-sky');
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
- &:hover {
271
- color: tm-color('warning-dark-new');
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
- &:hover {
279
- color: tm-color('success');
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
- &:hover {
301
- color: tm-color('dark-blue-new');
302
- text-decoration: none;
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
- &:hover {
309
- color: tm-color('soft-sky');
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
- &:hover {
331
- color: tm-color('admiral');
332
- text-decoration: none;
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
- &:hover {
339
- color: tm-color('silver-mist');
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
- &:hover {
387
- @include tm-icon-color('lightblue-light');
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
- &:hover {
416
- @include tm-icon-color('lightblue-light');
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
- &:hover {
447
- @include tm-icon-color('lightblue-light');
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
- &:hover {
1867
- @include tm-icon-color(lightblue-light);
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
- &:hover {
1883
- @include tm-icon-color(white);
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
- &:hover {
1891
- @include tm-icon-color(warning);
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
- &:hover {
1899
- @include tm-icon-color(success-light);
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
- &:hover {
1907
- @include tm-icon-color(success);
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
- &:hover {
1919
- @include tm-icon-color(lightblue-light);
1968
+ @media (hover: hover) {
1969
+ &:hover {
1970
+ @include tm-icon-color(lightblue-light);
1971
+ }
1920
1972
  }
1921
1973
  }
1922
1974
  }