@@ -1310,7 +1310,6 @@ export function createUtilities(theme: Theme) {
1310
1310
}
1311
1311
if ( ! value ) return
1312
1312
}
1313
- if ( Number . isNaN ( Number ( value ) ) ) return null
1314
1313
value = withNegative ( value , candidate )
1315
1314
// Set --tw-rotate even though we don't use it here. If the user also uses
1316
1315
// rotate-x, rotate-y, or rotate-z, the angle is needed in that declaration.
@@ -1447,40 +1446,6 @@ export function createUtilities(theme: Theme) {
1447
1446
] ,
1448
1447
} )
1449
1448
1450
- /**
1451
- * @css `scale`
1452
- */
1453
- functionalUtility ( 'scale-x' , {
1454
- supportsNegative : true ,
1455
- themeKeys : [ '--scale' ] ,
1456
- handleBareValue : ( { value } ) => {
1457
- if ( Number . isNaN ( Number ( value ) ) ) return null
1458
- return `${ value } %`
1459
- } ,
1460
- handle : ( value ) => [
1461
- scaleProperties ( ) ,
1462
- decl ( '--tw-scale-x' , value ) ,
1463
- decl ( 'scale' , `var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)` ) ,
1464
- ] ,
1465
- } )
1466
-
1467
- /**
1468
- * @css `scale`
1469
- */
1470
- functionalUtility ( 'scale-y' , {
1471
- supportsNegative : true ,
1472
- themeKeys : [ '--scale' ] ,
1473
- handleBareValue : ( { value } ) => {
1474
- if ( Number . isNaN ( Number ( value ) ) ) return null
1475
- return `${ value } %`
1476
- } ,
1477
- handle : ( value ) => [
1478
- scaleProperties ( ) ,
1479
- decl ( '--tw-scale-y' , value ) ,
1480
- decl ( 'scale' , `var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)` ) ,
1481
- ] ,
1482
- } )
1483
-
1484
1449
suggest ( 'scale' , ( ) => [
1485
1450
{
1486
1451
supportsNegative : true ,
@@ -1489,6 +1454,29 @@ export function createUtilities(theme: Theme) {
1489
1454
} ,
1490
1455
] )
1491
1456
1457
+ for ( let axis of [ 'x' , 'y' , 'z' ] ) {
1458
+ /**
1459
+ * @css `scale`
1460
+ */
1461
+ functionalUtility ( `scale-${ axis } ` , {
1462
+ supportsNegative : true ,
1463
+ themeKeys : [ '--scale' ] ,
1464
+ handleBareValue : ( { value } ) => {
1465
+ if ( Number . isNaN ( Number ( value ) ) ) return null
1466
+ return `${ value } %`
1467
+ } ,
1468
+ handle : ( value ) => [ ...scaleProperties ( ) , decl ( `--tw-scale-${ axis } ` , value ) ] ,
1469
+ } )
1470
+
1471
+ suggest ( `scale-${ axis } ` , ( ) => [
1472
+ {
1473
+ supportsNegative : true ,
1474
+ values : [ '0' , '50' , '75' , '90' , '95' , '100' , '105' , '110' , '125' , '150' , '200' ] ,
1475
+ valueThemeKeys : [ '--scale' ] ,
1476
+ } ,
1477
+ ] )
1478
+ }
1479
+
1492
1480
/**
1493
1481
* @css `scale`
1494
1482
*/
@@ -1512,26 +1500,6 @@ export function createUtilities(theme: Theme) {
1512
1500
} ,
1513
1501
] )
1514
1502
1515
- for ( let axis of [ 'x' , 'y' , 'z' ] ) {
1516
- /**
1517
- * @css `scale`
1518
- */
1519
- functionalUtility ( `scale-${ axis } ` , {
1520
- supportsNegative : true ,
1521
- themeKeys : [ '--scale' ] ,
1522
- handleBareValue : ( { value } ) => `${ value } %` ,
1523
- handle : ( value ) => [ ...scaleProperties ( ) , decl ( `--tw-scale-${ axis } ` , value ) ] ,
1524
- } )
1525
-
1526
- suggest ( `scale-${ axis } ` , ( ) => [
1527
- {
1528
- supportsNegative : true ,
1529
- values : [ '0' , '50' , '75' , '90' , '95' , '100' , '105' , '110' , '125' , '150' , '200' ] ,
1530
- valueThemeKeys : [ '--scale' ] ,
1531
- } ,
1532
- ] )
1533
- }
1534
-
1535
1503
/**
1536
1504
* @css `perspective`
1537
1505
*/
0 commit comments