Skip to content

Fix at-rule-descriptor-no-unknown false positives for declarations with feature-value-blocks #8865

@kryops

Description

@kryops

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

CSS from the Inter font definition: https://rsms.me/inter/

@font-feature-values InterVariable {
  @character-variant {
    cv01: 1;
    cv02: 2;
    cv03: 3;
    cv04: 4;
    cv05: 5;
    cv06: 6;
    cv07: 7;
    cv08: 8;
    cv09: 9;
    cv10: 10;
    cv11: 11;
    cv12: 12;
    cv13: 13;
    alt-1: 1; /* Alternate one */
    alt-3: 9; /* Flat-top three */
    open-4: 2; /* Open four */
    open-6: 3; /* Open six */
    open-9: 4; /* Open nine */
    lc-l-with-tail: 5; /* Lower-case L with tail */
    simplified-u: 6; /* Simplified u */
    alt-double-s: 7; /* Alternate German double s */
    uc-i-with-serif: 8; /* Upper-case i with serif */
    uc-g-with-spur: 10; /* Capital G with spur */
    single-story-a: 11; /* Single-story a */
    compact-lc-f: 12; /* Compact f */
    compact-lc-t: 13; /* Compact t */
  }

  @styleset {
    ss01: 1;
    ss02: 2;
    ss03: 3;
    ss04: 4;
    ss05: 5;
    ss06: 6;
    ss07: 7;
    ss08: 8;
    open-digits: 1; /* Open digits */
    disambiguation: 2; /* Disambiguation (with zero) */
    disambiguation-except-zero: 4; /* Disambiguation (no zero) */
    round-quotes-and-commas: 3; /* Round quotes & commas */
    square-punctuation: 7; /* Square punctuation */
    square-quotes: 8; /* Square quotes */
    circled-characters: 5; /* Circled characters */
    squared-characters: 6; /* Squared characters */
  }
}

What minimal configuration is needed to reproduce the bug?

export default {
	extends: ['stylelint-config-standard'],
};

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

{
  "stylelint": "16.26.1",
  "stylelint-config-css-modules": "4.5.1",
  "stylelint-config-standard": "39.0.1"
}

What did you expect to happen?

No error

What actually happened?

Errors for every property:

Unexpected unknown descriptor "cv01" for at-rule "@font-feature-values" (at-rule-descriptor-no-unknown)Stylelint[at-rule-descriptor-no-unknown](https://stylelint.io/user-guide/rules/at-rule-descriptor-no-unknown)

Do you have a proposal to fix the bug?

16.26.0 did not report an error here; maybe regression in #8850 ?

Thanks for looking into it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: wipis being worked on by someone

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions