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. 
    
  8. // List derived from Gecko source code:
    
  9. // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
    
  10. export const shorthandToLonghand = {
    
  11.   animation: [
    
  12.     'animationDelay',
    
  13.     'animationDirection',
    
  14.     'animationDuration',
    
  15.     'animationFillMode',
    
  16.     'animationIterationCount',
    
  17.     'animationName',
    
  18.     'animationPlayState',
    
  19.     'animationTimingFunction',
    
  20.   ],
    
  21.   background: [
    
  22.     'backgroundAttachment',
    
  23.     'backgroundClip',
    
  24.     'backgroundColor',
    
  25.     'backgroundImage',
    
  26.     'backgroundOrigin',
    
  27.     'backgroundPositionX',
    
  28.     'backgroundPositionY',
    
  29.     'backgroundRepeat',
    
  30.     'backgroundSize',
    
  31.   ],
    
  32.   backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
    
  33.   border: [
    
  34.     'borderBottomColor',
    
  35.     'borderBottomStyle',
    
  36.     'borderBottomWidth',
    
  37.     'borderImageOutset',
    
  38.     'borderImageRepeat',
    
  39.     'borderImageSlice',
    
  40.     'borderImageSource',
    
  41.     'borderImageWidth',
    
  42.     'borderLeftColor',
    
  43.     'borderLeftStyle',
    
  44.     'borderLeftWidth',
    
  45.     'borderRightColor',
    
  46.     'borderRightStyle',
    
  47.     'borderRightWidth',
    
  48.     'borderTopColor',
    
  49.     'borderTopStyle',
    
  50.     'borderTopWidth',
    
  51.   ],
    
  52.   borderBlockEnd: [
    
  53.     'borderBlockEndColor',
    
  54.     'borderBlockEndStyle',
    
  55.     'borderBlockEndWidth',
    
  56.   ],
    
  57.   borderBlockStart: [
    
  58.     'borderBlockStartColor',
    
  59.     'borderBlockStartStyle',
    
  60.     'borderBlockStartWidth',
    
  61.   ],
    
  62.   borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
    
  63.   borderColor: [
    
  64.     'borderBottomColor',
    
  65.     'borderLeftColor',
    
  66.     'borderRightColor',
    
  67.     'borderTopColor',
    
  68.   ],
    
  69.   borderImage: [
    
  70.     'borderImageOutset',
    
  71.     'borderImageRepeat',
    
  72.     'borderImageSlice',
    
  73.     'borderImageSource',
    
  74.     'borderImageWidth',
    
  75.   ],
    
  76.   borderInlineEnd: [
    
  77.     'borderInlineEndColor',
    
  78.     'borderInlineEndStyle',
    
  79.     'borderInlineEndWidth',
    
  80.   ],
    
  81.   borderInlineStart: [
    
  82.     'borderInlineStartColor',
    
  83.     'borderInlineStartStyle',
    
  84.     'borderInlineStartWidth',
    
  85.   ],
    
  86.   borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
    
  87.   borderRadius: [
    
  88.     'borderBottomLeftRadius',
    
  89.     'borderBottomRightRadius',
    
  90.     'borderTopLeftRadius',
    
  91.     'borderTopRightRadius',
    
  92.   ],
    
  93.   borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
    
  94.   borderStyle: [
    
  95.     'borderBottomStyle',
    
  96.     'borderLeftStyle',
    
  97.     'borderRightStyle',
    
  98.     'borderTopStyle',
    
  99.   ],
    
  100.   borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
    
  101.   borderWidth: [
    
  102.     'borderBottomWidth',
    
  103.     'borderLeftWidth',
    
  104.     'borderRightWidth',
    
  105.     'borderTopWidth',
    
  106.   ],
    
  107.   columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
    
  108.   columns: ['columnCount', 'columnWidth'],
    
  109.   flex: ['flexBasis', 'flexGrow', 'flexShrink'],
    
  110.   flexFlow: ['flexDirection', 'flexWrap'],
    
  111.   font: [
    
  112.     'fontFamily',
    
  113.     'fontFeatureSettings',
    
  114.     'fontKerning',
    
  115.     'fontLanguageOverride',
    
  116.     'fontSize',
    
  117.     'fontSizeAdjust',
    
  118.     'fontStretch',
    
  119.     'fontStyle',
    
  120.     'fontVariant',
    
  121.     'fontVariantAlternates',
    
  122.     'fontVariantCaps',
    
  123.     'fontVariantEastAsian',
    
  124.     'fontVariantLigatures',
    
  125.     'fontVariantNumeric',
    
  126.     'fontVariantPosition',
    
  127.     'fontWeight',
    
  128.     'lineHeight',
    
  129.   ],
    
  130.   fontVariant: [
    
  131.     'fontVariantAlternates',
    
  132.     'fontVariantCaps',
    
  133.     'fontVariantEastAsian',
    
  134.     'fontVariantLigatures',
    
  135.     'fontVariantNumeric',
    
  136.     'fontVariantPosition',
    
  137.   ],
    
  138.   gap: ['columnGap', 'rowGap'],
    
  139.   grid: [
    
  140.     'gridAutoColumns',
    
  141.     'gridAutoFlow',
    
  142.     'gridAutoRows',
    
  143.     'gridTemplateAreas',
    
  144.     'gridTemplateColumns',
    
  145.     'gridTemplateRows',
    
  146.   ],
    
  147.   gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
    
  148.   gridColumn: ['gridColumnEnd', 'gridColumnStart'],
    
  149.   gridColumnGap: ['columnGap'],
    
  150.   gridGap: ['columnGap', 'rowGap'],
    
  151.   gridRow: ['gridRowEnd', 'gridRowStart'],
    
  152.   gridRowGap: ['rowGap'],
    
  153.   gridTemplate: [
    
  154.     'gridTemplateAreas',
    
  155.     'gridTemplateColumns',
    
  156.     'gridTemplateRows',
    
  157.   ],
    
  158.   listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
    
  159.   margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
    
  160.   marker: ['markerEnd', 'markerMid', 'markerStart'],
    
  161.   mask: [
    
  162.     'maskClip',
    
  163.     'maskComposite',
    
  164.     'maskImage',
    
  165.     'maskMode',
    
  166.     'maskOrigin',
    
  167.     'maskPositionX',
    
  168.     'maskPositionY',
    
  169.     'maskRepeat',
    
  170.     'maskSize',
    
  171.   ],
    
  172.   maskPosition: ['maskPositionX', 'maskPositionY'],
    
  173.   outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
    
  174.   overflow: ['overflowX', 'overflowY'],
    
  175.   padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
    
  176.   placeContent: ['alignContent', 'justifyContent'],
    
  177.   placeItems: ['alignItems', 'justifyItems'],
    
  178.   placeSelf: ['alignSelf', 'justifySelf'],
    
  179.   textDecoration: [
    
  180.     'textDecorationColor',
    
  181.     'textDecorationLine',
    
  182.     'textDecorationStyle',
    
  183.   ],
    
  184.   textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
    
  185.   transition: [
    
  186.     'transitionDelay',
    
  187.     'transitionDuration',
    
  188.     'transitionProperty',
    
  189.     'transitionTimingFunction',
    
  190.   ],
    
  191.   wordWrap: ['overflowWrap'],
    
  192. };