Skip to content

Commit a4a1d2d

Browse files
committed
Document createGenericPropertyDescriptor
Closes #280.
1 parent b7cb58d commit a4a1d2d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/utils/propertyDescriptors.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ const parsers = require("../parsers");
66
const { AST_TYPES } = parsers;
77

88
/**
9-
* Creates a generic property descriptor for a CSS property.
9+
* Creates a generic property descriptor for a given property. Such descriptors are used whenever we don't have a
10+
* specific handler in `./properties/*.js`. They perform some basic logic that works as a fallback, and is correct for
11+
* simple properties, but properties with more complex grammars will need their own handlers.
1012
*
11-
* @param {string} property - The name of the CSS property.
12-
* @returns {object} The property descriptor object.
13+
* @param {string} property - The canonical CSS property name (e.g. "backdrop-filter", not "backdropFilter").
14+
* @returns {Object} The property descriptor object.
1315
*/
1416
function createGenericPropertyDescriptor(property) {
1517
return {

0 commit comments

Comments
 (0)