Skip to content

Commit 4e621fd

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

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/utils/propertyDescriptors.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ 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.
13+
* @param {string} property - The canonical CSS property name (e.g. "backdrop-filter", not "backdropFilter").
1214
* @returns {object} The property descriptor object.
1315
*/
1416
function createGenericPropertyDescriptor(property) {

0 commit comments

Comments
 (0)