From 5e070f6b5acae349df449883839f54760d940d55 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sun, 11 Jan 2026 16:43:54 +0900 Subject: [PATCH] Document createGenericPropertyDescriptor Closes #280. --- lib/utils/propertyDescriptors.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/utils/propertyDescriptors.js b/lib/utils/propertyDescriptors.js index 90d57129..e3ca6760 100644 --- a/lib/utils/propertyDescriptors.js +++ b/lib/utils/propertyDescriptors.js @@ -6,9 +6,11 @@ const parsers = require("../parsers"); const { AST_TYPES } = parsers; /** - * Creates a generic property descriptor for a CSS property. + * Creates a generic property descriptor for a given property. Such descriptors are used whenever we don't have a + * specific handler in `./properties/*.js`. They perform some basic logic that works as a fallback, and is correct for + * simple properties, but properties with more complex grammars will need their own handlers. * - * @param {string} property - The name of the CSS property. + * @param {string} property - The canonical CSS property name (e.g. "backdrop-filter", not "backdropFilter"). * @returns {object} The property descriptor object. */ function createGenericPropertyDescriptor(property) {