The mdn-data CSS properties are represented as JSON objects. The structure of these objects differs depending on whether the property is a long-hand property or a short-hand property.
Long-hand properties
Long-hand properties typically use single values (strings or enums) for fields like animationType, percentages, initial, and computed.
Short-hand properties
Short-hand properties use arrays for fields like animationType, percentages, initial, and computed to list the constituent long-hand properties that the short-hand property controls or derives from.
// Example Long-hand property
"background-color": {
"syntax": "<color>",
"media": "visual",
"inherited": false,
"animationType": "color",
"percentages": "no",
"groups": ["CSS Background and Borders"],
"initial": "transparent",
"appliesto": "allElements",
"computed": "computedColor",
"order": "uniqueOrder",
"alsoAppliesTo": ["::first-letter", "::first-line", "::placeholder"],
"status": "standard"
}
// Example Short-hand property
"background": {
"syntax": "[ <bg-layer> , ]* <final-bg-layer>",
"media": "visual",
"inherited": false,
"animationType": [
"background-color",
"background-image",
"background-clip",
"background-position",
"background-size",
"background-repeat",
"background-attachment"
],
"percentages": [
"background-position",
"background-size"
],
"groups": ["CSS Background and Borders"],
"initial": [
"background-image",
"background-position",
"background-size",
"background-repeat",
"background-origin",
"background-clip",
"background-attachment",
"background-color"
],
"appliesto": "allElements",
"computed": [
"background-image",
"background-position",
"background-size",
"background-repeat",
"background-origin",
"background-clip",
"background-attachment",
"background-color"
],
"order": "orderOfAppearance",
"alsoAppliesTo": ["::first-letter", "::first-line", "::placeholder"],
"status": "standard"
}