Skip to content

Commit ad913ee

Browse files
authored
refactor: update font size utility (#145)
* refactor: update font size utility * test: add unit tests for getElementFontSize utility * refactor: update createArrow function to use size parameter instead of fontSize
1 parent 46a3520 commit ad913ee

31 files changed

Lines changed: 448 additions & 362 deletions

File tree

__tests__/charts/utils/getElementFontSize.spec.ts

Lines changed: 0 additions & 114 deletions
This file was deleted.

__tests__/snapshot/text-register-plugin.html

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
display: inline-block;
3939
align-items: center;
4040
box-sizing: border-box;
41-
font-size: 14px;
4241
font-family: PingFangSC, sans-serif;
4342
line-height: 1.5em;
4443
border-radius: 2px;
@@ -58,7 +57,6 @@
5857
display: inline-block;
5958
align-items: center;
6059
box-sizing: border-box;
61-
font-size: 14px;
6260
font-family: PingFangSC, sans-serif;
6361
line-height: 1.5em;
6462
border-radius: 2px;
@@ -76,7 +74,6 @@
7674
display: inline-block;
7775
align-items: center;
7876
box-sizing: border-box;
79-
font-size: 14px;
8077
font-family: PingFangSC, sans-serif;
8178
line-height: 1.5em;
8279
border-radius: 2px;
@@ -94,7 +91,6 @@
9491
display: inline-block;
9592
align-items: center;
9693
box-sizing: border-box;
97-
font-size: 14px;
9894
font-family: PingFangSC, sans-serif;
9995
line-height: 1.5em;
10096
border-radius: 2px;
@@ -113,7 +109,6 @@
113109
display: inline-block;
114110
align-items: center;
115111
box-sizing: border-box;
116-
font-size: 14px;
117112
font-family: PingFangSC, sans-serif;
118113
line-height: 1.5em;
119114
border-radius: 2px;
@@ -145,7 +140,6 @@
145140
display: inline-block;
146141
align-items: center;
147142
box-sizing: border-box;
148-
font-size: 14px;
149143
font-family: PingFangSC, sans-serif;
150144
line-height: 1.5em;
151145
border-radius: 2px;
@@ -164,7 +158,6 @@
164158
display: inline-block;
165159
align-items: center;
166160
box-sizing: border-box;
167-
font-size: 14px;
168161
font-family: PingFangSC, sans-serif;
169162
line-height: 1.5em;
170163
border-radius: 2px;
@@ -181,7 +174,6 @@
181174
display: inline-block;
182175
align-items: center;
183176
box-sizing: border-box;
184-
font-size: 14px;
185177
font-family: PingFangSC, sans-serif;
186178
line-height: 1.5em;
187179
border-radius: 2px;
@@ -198,7 +190,6 @@
198190
display: inline-block;
199191
align-items: center;
200192
box-sizing: border-box;
201-
font-size: 14px;
202193
font-family: PingFangSC, sans-serif;
203194
line-height: 1.5em;
204195
border-radius: 2px;
@@ -215,7 +206,6 @@
215206
display: inline-block;
216207
align-items: center;
217208
box-sizing: border-box;
218-
font-size: 14px;
219209
font-family: PingFangSC, sans-serif;
220210
line-height: 1.5em;
221211
border-radius: 2px;
@@ -249,7 +239,6 @@
249239
display: inline-block;
250240
align-items: center;
251241
box-sizing: border-box;
252-
font-size: 14px;
253242
font-family: PingFangSC, sans-serif;
254243
line-height: 1.5em;
255244
border-radius: 2px;
@@ -300,12 +289,12 @@
300289
display: inline-block;
301290
align-items: center;
302291
box-sizing: border-box;
303-
font-size: 28px;
304292
font-family: PingFangSC, sans-serif;
305293
line-height: 1.5em;
306294
border-radius: 2px;
307295
color: red;
308296
margin: 0px 2px;
297+
font-size: 28px;
309298
"
310299
class="t8-value t8-dim_value"
311300
>Prospecting</span
@@ -318,7 +307,6 @@
318307
display: inline-block;
319308
align-items: center;
320309
box-sizing: border-box;
321-
font-size: 14px;
322310
font-family: PingFangSC, sans-serif;
323311
line-height: 1.5em;
324312
border-radius: 2px;
@@ -364,7 +352,6 @@
364352
display: inline-block;
365353
align-items: center;
366354
box-sizing: border-box;
367-
font-size: 14px;
368355
font-family: PingFangSC, sans-serif;
369356
line-height: 1.5em;
370357
border-radius: 2px;
@@ -390,7 +377,6 @@
390377
display: inline-block;
391378
align-items: center;
392379
box-sizing: border-box;
393-
font-size: 14px;
394380
font-family: PingFangSC, sans-serif;
395381
line-height: 1.5em;
396382
border-radius: 2px;
@@ -423,12 +409,12 @@
423409
display: inline-block;
424410
align-items: center;
425411
box-sizing: border-box;
426-
font-size: 28px;
427412
font-family: PingFangSC, sans-serif;
428413
line-height: 1.5em;
429414
border-radius: 2px;
430415
color: red;
431416
margin: 0px 2px;
417+
font-size: 28px;
432418
"
433419
class="t8-value t8-dim_value"
434420
>Keely Townsend</span
@@ -441,7 +427,6 @@
441427
display: inline-block;
442428
align-items: center;
443429
box-sizing: border-box;
444-
font-size: 14px;
445430
font-family: PingFangSC, sans-serif;
446431
line-height: 1.5em;
447432
border-radius: 2px;
@@ -462,12 +447,12 @@
462447
display: inline-block;
463448
align-items: center;
464449
box-sizing: border-box;
465-
font-size: 28px;
466450
font-family: PingFangSC, sans-serif;
467451
line-height: 1.5em;
468452
border-radius: 2px;
469453
color: red;
470454
margin: 0px 2px;
455+
font-size: 28px;
471456
"
472457
class="t8-value t8-dim_value"
473458
>New Client</span
@@ -480,7 +465,6 @@
480465
display: inline-block;
481466
align-items: center;
482467
box-sizing: border-box;
483-
font-size: 14px;
484468
font-family: PingFangSC, sans-serif;
485469
line-height: 1.5em;
486470
border-radius: 2px;
@@ -514,7 +498,6 @@
514498
display: inline-block;
515499
align-items: center;
516500
box-sizing: border-box;
517-
font-size: 14px;
518501
font-family: PingFangSC, sans-serif;
519502
line-height: 1.5em;
520503
border-radius: 2px;
@@ -533,7 +516,6 @@
533516
display: inline-block;
534517
align-items: center;
535518
box-sizing: border-box;
536-
font-size: 14px;
537519
font-family: PingFangSC, sans-serif;
538520
line-height: 1.5em;
539521
border-radius: 2px;
@@ -550,7 +532,6 @@
550532
display: inline-block;
551533
align-items: center;
552534
box-sizing: border-box;
553-
font-size: 14px;
554535
font-family: PingFangSC, sans-serif;
555536
line-height: 1.5em;
556537
border-radius: 2px;
@@ -567,7 +548,6 @@
567548
display: inline-block;
568549
align-items: center;
569550
box-sizing: border-box;
570-
font-size: 14px;
571551
font-family: PingFangSC, sans-serif;
572552
line-height: 1.5em;
573553
border-radius: 2px;
@@ -600,7 +580,6 @@
600580
display: inline-block;
601581
align-items: center;
602582
box-sizing: border-box;
603-
font-size: 14px;
604583
font-family: PingFangSC, sans-serif;
605584
line-height: 1.5em;
606585
border-radius: 2px;
@@ -619,7 +598,6 @@
619598
display: inline-block;
620599
align-items: center;
621600
box-sizing: border-box;
622-
font-size: 14px;
623601
font-family: PingFangSC, sans-serif;
624602
line-height: 1.5em;
625603
border-radius: 2px;
@@ -636,7 +614,6 @@
636614
display: inline-block;
637615
align-items: center;
638616
box-sizing: border-box;
639-
font-size: 14px;
640617
font-family: PingFangSC, sans-serif;
641618
line-height: 1.5em;
642619
border-radius: 2px;
@@ -653,7 +630,6 @@
653630
display: inline-block;
654631
align-items: center;
655632
box-sizing: border-box;
656-
font-size: 14px;
657633
font-family: PingFangSC, sans-serif;
658634
line-height: 1.5em;
659635
border-radius: 2px;

0 commit comments

Comments
 (0)