@eslint/css-tree 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -443,9 +443,13 @@ class Lexer {
443
443
  return atrule && atrule.prelude || null;
444
444
  }
445
445
  getAtruleDescriptor(atruleName, name) {
446
- return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators
447
- ? this.atrules[atruleName].declarators[name] || null
446
+ const atrule = this.getAtrule(atruleName);
447
+ const descriptor = names.keyword(name);
448
+ const descriptorEntry = atrule && atrule.descriptors
449
+ ? atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename]
448
450
  : null;
451
+
452
+ return descriptorEntry || null;
449
453
  }
450
454
  getProperty(propertyName, fallbackBasename = true) {
451
455
  const property = names.property(propertyName);