1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @flow
    
  8.  */
    
  9. 
    
  10. /**
    
  11.  * CSS properties which accept numbers but are not in units of "px".
    
  12.  */
    
  13. const unitlessNumbers = new Set([
    
  14.   'animationIterationCount',
    
  15.   'aspectRatio',
    
  16.   'borderImageOutset',
    
  17.   'borderImageSlice',
    
  18.   'borderImageWidth',
    
  19.   'boxFlex',
    
  20.   'boxFlexGroup',
    
  21.   'boxOrdinalGroup',
    
  22.   'columnCount',
    
  23.   'columns',
    
  24.   'flex',
    
  25.   'flexGrow',
    
  26.   'flexPositive',
    
  27.   'flexShrink',
    
  28.   'flexNegative',
    
  29.   'flexOrder',
    
  30.   'gridArea',
    
  31.   'gridRow',
    
  32.   'gridRowEnd',
    
  33.   'gridRowSpan',
    
  34.   'gridRowStart',
    
  35.   'gridColumn',
    
  36.   'gridColumnEnd',
    
  37.   'gridColumnSpan',
    
  38.   'gridColumnStart',
    
  39.   'fontWeight',
    
  40.   'lineClamp',
    
  41.   'lineHeight',
    
  42.   'opacity',
    
  43.   'order',
    
  44.   'orphans',
    
  45.   'scale',
    
  46.   'tabSize',
    
  47.   'widows',
    
  48.   'zIndex',
    
  49.   'zoom',
    
  50.   'fillOpacity', // SVG-related properties
    
  51.   'floodOpacity',
    
  52.   'stopOpacity',
    
  53.   'strokeDasharray',
    
  54.   'strokeDashoffset',
    
  55.   'strokeMiterlimit',
    
  56.   'strokeOpacity',
    
  57.   'strokeWidth',
    
  58.   'MozAnimationIterationCount', // Known Prefixed Properties
    
  59.   'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code
    
  60.   'MozBoxFlexGroup',
    
  61.   'MozLineClamp',
    
  62.   'msAnimationIterationCount',
    
  63.   'msFlex',
    
  64.   'msZoom',
    
  65.   'msFlexGrow',
    
  66.   'msFlexNegative',
    
  67.   'msFlexOrder',
    
  68.   'msFlexPositive',
    
  69.   'msFlexShrink',
    
  70.   'msGridColumn',
    
  71.   'msGridColumnSpan',
    
  72.   'msGridRow',
    
  73.   'msGridRowSpan',
    
  74.   'WebkitAnimationIterationCount',
    
  75.   'WebkitBoxFlex',
    
  76.   'WebKitBoxFlexGroup',
    
  77.   'WebkitBoxOrdinalGroup',
    
  78.   'WebkitColumnCount',
    
  79.   'WebkitColumns',
    
  80.   'WebkitFlex',
    
  81.   'WebkitFlexGrow',
    
  82.   'WebkitFlexPositive',
    
  83.   'WebkitFlexShrink',
    
  84.   'WebkitLineClamp',
    
  85. ]);
    
  86. export default function (name: string): boolean {
    
  87.   return unitlessNumbers.has(name);
    
  88. }