File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -3184,10 +3184,9 @@ exports[`render real world component real world $ 91`] = `
31843184 maskPos = " center"
31853185 maskRepeat = " no-repeat"
31863186 maskSize = " contain"
3187- pb = " 5px"
31883187 pl = " 9px"
31893188 pr = " 7px"
3190- pt = " 5px"
3189+ py = " 5px"
31913190 transform = " rotate(180deg)"
31923191 />
31933192 </Center >
@@ -3207,10 +3206,7 @@ exports[`render real world component real world $ 92`] = `
32073206 maskPos = " center"
32083207 maskRepeat = " no-repeat"
32093208 maskSize = " contain"
3210- pb = " 2.29px"
3211- pl = " 2.29px"
3212- pr = " 2.29px"
3213- pt = " 2.29px"
3209+ p = " 2.29px"
32143210 />
32153211 </Center >
32163212 )
@@ -3239,10 +3235,8 @@ exports[`render real world component real world $ 94`] = `
32393235 maskPos = " center"
32403236 maskRepeat = " no-repeat"
32413237 maskSize = " contain"
3242- pb = " 2.33px"
3243- pl = " 2.65px"
3244- pr = " 2.65px"
3245- pt = " 2.33px"
3238+ px = " 2.65px"
3239+ py = " 2.33px"
32463240 />
32473241 </Center >
32483242 )
@@ -3271,10 +3265,8 @@ exports[`render real world component real world $ 96`] = `
32713265 maskPos = " center"
32723266 maskRepeat = " no-repeat"
32733267 maskSize = " contain"
3274- pb = " 2.33px"
3275- pl = " 2.65px"
3276- pr = " 2.65px"
3277- pt = " 2.33px"
3268+ px = " 2.65px"
3269+ py = " 2.33px"
32783270 />
32793271 </Center >
32803272 )
Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ export function optimizeSpace(
77 b : number ,
88 l : number ,
99) : Record < string , string | undefined > {
10+ // Round to 2 decimal places to handle Figma floating-point imprecision
11+ // (e.g. 1.5 vs 1.5000009536743164). Matches formatNumber's rounding.
12+ t = Math . round ( t * 100 ) / 100
13+ r = Math . round ( r * 100 ) / 100
14+ b = Math . round ( b * 100 ) / 100
15+ l = Math . round ( l * 100 ) / 100
16+
1017 if ( t === r && r === b && b === l ) {
1118 return { [ type ] : addPx ( t ) }
1219 }
You can’t perform that action at this time.
0 commit comments