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

🐛 BUG: Astro emmet completions broken with 2.12.8 update, does not offer correct auto complete #921

Closed
davidjost opened this issue Jul 26, 2024 · 5 comments · Fixed by withastro/compiler#1037
Labels
needs repro Issue needs a reproduction

Comments

@davidjost
Copy link

davidjost commented Jul 26, 2024

Describe the Bug

I was writing CSS in astro when the VScode extension update showed, updated it, immediately after the auto completions were broken.

Expected behavior
Typing ttu offers and autocompletes to: text-transform: uppercase;

Current behavior in v2.12.8
Typing ttu offers text-underline-offset and autocompletes to ttext-underline-offset: ; (including extra t)

This goes for all CSS suggestions. HTML emmet seems to be working fine so far.

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 26, 2024
@davidjost davidjost changed the title 🐛 BUG: Astro emmet completions broken with latest update, does not offer correct auto complete 🐛 BUG: Astro emmet completions broken with 2.12.8 update, does not offer correct auto complete Jul 26, 2024
@Princesseuh
Copy link
Member

Princesseuh commented Jul 26, 2024

Could you share a full file where this happens? 2.12.8 reverted Emmet completions to the previous state completely, so there might be something else going on.

Everything seems to work for me, fwiw.

@Princesseuh Princesseuh added needs repro Issue needs a reproduction and removed needs triage Issue needs to be triaged labels Jul 26, 2024
Copy link
Contributor

Hello @davidjost. Please provide a minimal reproduction using a GitHub repository or at least sharing the file where the issue happen. Issues marked with needs repro will be closed if they have no activity within 3 days.

@davidjost
Copy link
Author

It definitely is file related, I can't share this file specifically. I have tracked the issue in a test file with 8 imports, 170 lines of html, css:gobal, css and empty script tag, see gif.

Emmet shows in the global css scope and does not in the local scope.

I can't reproduce the behavior in a new file with the same structure, it works as it should with emmet offered in both scopes.

Jul-26-2024 17-16-59

@davidjost
Copy link
Author

davidjost commented Jul 30, 2024

I have tracked the issue to an emoji used in a <style is:global> block that sits in an inline svg declaration.

<style is:global>
  .logo:hover {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:2em;'><text y='70%'>😎</text></svg>") 16 0, auto;
    filter: brightness(220%) saturate(200%) drop-shadow(0px 0px 2px teal) drop-shadow(var(--value) var(--value) 0 oklch(var(--color-accent-20))) drop-shadow(var(--calc) var(--calc) 0 oklch(var(--color-accent-30)));
  }
</style>

Removing the emoji solves the issue.

Jul-30-2024 16-36-02

@Princesseuh
Copy link
Member

Princesseuh commented Jul 30, 2024

Aah, thank you! I know exactly what the problem is now. Will start working on a fix, apologies for the inconvenience!

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

Successfully merging a pull request may close this issue.

2 participants