Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode-lit-plugin ignores css.customData #373

Open
jimbojw opened this issue Oct 13, 2024 · 0 comments
Open

vscode-lit-plugin ignores css.customData #373

jimbojw opened this issue Oct 13, 2024 · 0 comments

Comments

@jimbojw
Copy link

jimbojw commented Oct 13, 2024

According to the vscode-css-languageservice documentation, it supports configuration via the css.customData setting.

However, the vscode-lit-plugin does not appear to honor these settings when analyzing css templates. For example, it should be possible to define a custom @ rule, like so:

.vscode/settings.json:

{
  "css.customData": ["./.vscode/css-data.json"]
}

.vscode/css-data.json (attempting to work around #323):

{
  "version": 1.1,
  "atDirectives": [
    {
      "name": "@container",
      "description": "https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries"
    }
  ]
}

Example TypeScript code:

import { css } from "lit";

export const EXAMPLE_CSS = css `
  @container (width < 600px) {
    /* ... */
  }
`;

Expected: No warnings.

Actual: Problems view reads Unknown at rule @container lit-plugin(no-invalid-css).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant