Skip to content

Fix custom-property-no-missing-var-function false positive for timeline-scope #9163

@splincode

Description

@splincode

What minimal example or steps are needed to reproduce the bug?

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/timeline-scope

@property --value {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

[directive] {
    timeline-scope: --value; // valid by https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/timeline-scope
}

What minimal configuration is needed to reproduce the bug?

module.exports = {
    $schema:
        'https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json',
    rules: {
          'custom-property-no-missing-var-function': true,
    },
};

How did you run Stylelint?

stylelint projects/stylelint-config/tests/valid.css

Which Stylelint-related dependencies are you using?

"peerDependencies": {
        "@stylistic/stylelint-config": "^4.0.0",
        "@stylistic/stylelint-plugin": "^5.0.1",
        "@taiga-ui/browserslist-config": "0.433.0",
        "postcss": "^8.5.8",
        "postcss-less": "^6.0.0",
        "stylelint": "^17.5.0",
        "stylelint-config-standard": "^40.0.0",
        "stylelint-no-unsupported-browser-features": "^8.1.1",
        "stylelint-order": "^8.1.1",
        "stylelint-plugin-logical-css": "^2.0.2",
        "stylelint-plugin-use-baseline": "^1.4.1",
        "stylelint-rem-over-px": "^1.0.2",
        "stylelint-use-logical": "^2.1.3"
    },

What did you expect to happen?

No error

What actually happened?

projects/stylelint-config/tests/valid.css
  20:21  ✖  Unexpected missing var function for "--value"  custom-property-no-missing-var-function

Do you have a proposal to fix the bug?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions