Skip to content

Add css.ignoredSelectors setting to suppress validation for framework-injected variables #332

Description

@FrontDev

Problem

When using Vue CSS Modules, :class="$style['component']" triggers CSS selector '$style' not found. - $style is a runtime object injected by Vue, not a CSS class name.

There is currently no way to tell the extension to ignore specific tokens during validation.

Proposal

A new setting for example css.ignoredSelectors that accepts
a list of strings (or glob patterns) to exclude from validation:

{
  "css.ignoredSelectors": ["$style", "$attrs"]
}

Or with wildcard support:

{
  "css.ignoredSelectors": ["$*"]
}

Matched tokens would be silently skipped during validation while
all other class names in the same attribute are still checked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions