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

Support for container-properties and @container rules #609

Closed
threema-danilo opened this issue Jul 21, 2023 · 2 comments
Closed

Support for container-properties and @container rules #609

threema-danilo opened this issue Jul 21, 2023 · 2 comments

Comments

@threema-danilo
Copy link

Is your feature request related to a problem? Please describe.

When using container-properties and @container rules / at-queries, svelte-check complains about these properties not being known:

<style lang="scss">
  .profile-picture {
    container-type: size;
    container-name: resize-box;
    /* ... */

    @container resize-box (aspect-ratio > 1/1) {
      .inner {
        width: auto;
        height: 100%;
      }
    }
  }
</style>

svelte-check output:

ProfilePicture.svelte:41:5
Warn: Unknown property: 'container-type' (scss)
  .profile-picture {
    container-type: size;
    container-name: resize-box;


ProfilePicture.svelte:42:5
Warn: Unknown property: 'container-name' (scss)
    container-type: size;
    container-name: resize-box;
    grid-area: profile-picture;


ProfilePicture.svelte:65:5
Warn: Unknown at rule @container (scss)

    @container resize-box (aspect-ratio > 1/1) {
      .inner {

Describe the solution you'd like

I'm not sure whether this is the proper repository for such a feature request, but container queries are already usable in current browsers and it would be good if this wouldn't trigger a warning 🙂 https://caniuse.com/?search=%40container

Describe alternatives you've considered

I could disable all warnings for unknown properties and at-queries, but that might silence warnings for actual typos.

How important is this feature to you?

I currently have to disable fail-on-warnings in CI because of this.

@dummdidumm
Copy link
Member

This isn't related to Svelte or preprocessing, this is related to the language tools / svelte-check. Those use the vscode-css-languageservice for intellisense inside the style tags, and that doesn't support container queries yet - see this upstream issue for more info. Closing in favor of that.

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
@threema-danilo
Copy link
Author

Ah, thanks for linking to the proper issue! 👍🏻

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

2 participants