We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f4575f commit 20bcd17Copy full SHA for 20bcd17
src/CssLint/Linter.php
@@ -386,9 +386,15 @@ protected function lintPropertyNameChar(string $sChar): ?bool
386
}
387
388
if ($sChar === ':') {
389
- // Check if property name exists
390
$sPropertyName = trim($this->getContextContent());
391
+ // Ignore CSS variables (names starting with --)
392
+ if (substr($sPropertyName, 0, 2) === '--') {
393
+ $this->setContext(self::CONTEXT_PROPERTY_CONTENT);
394
+ return true;
395
+ }
396
+
397
+ // Check if property name exists
398
if (!$this->getCssLintProperties()->propertyExists($sPropertyName)) {
399
$this->addError('Unknown CSS property "' . $sPropertyName . '"');
400
0 commit comments