Skip to content

Add basic media query auto complete support #443

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

Merged
merged 8 commits into from
Jun 2, 2025

Conversation

Legend-Master
Copy link
Contributor

@Legend-Master Legend-Master commented May 29, 2025

@aeschli
Copy link
Collaborator

aeschli commented Jun 2, 2025

Nice, thanks a lot!

@vs-code-engineering vs-code-engineering bot added this to the May 2025 milestone Jun 2, 2025
@aeschli aeschli enabled auto-merge (squash) June 2, 2025 12:46
@aeschli aeschli merged commit 4981563 into microsoft:main Jun 2, 2025
3 checks passed
@germanfrelo
Copy link

Great addition! Although I can't see any autocomplete suggestions for @media (min- or @media (max-):

Image

Is that intentional?

I'm using Visual Studio Code (all extensions disabled):

  • Version: 1.101.0
  • Commit: dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1
  • Date: 2025-06-11T15:00:50.123Z
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) - Code/1.101.0 Chrome/134.0.6998.205 Electron/35.5.1 Safari/537.36

@Legend-Master
Copy link
Contributor Author

Legend-Master commented Jun 14, 2025

This syntax is derived from the range type and needs some special handling, and that is not implemented yet

To be honest though it's kinda intentional to me, since I find that syntax quite hard to reason about, and most of the time, if you use anything like postcss (included in many bundlers by default), the new syntax (@media (width <= 300px) {}) would be transformed automatically if you target old browsers, also this is baseline 2023 so most browsers already support them natively

@germanfrelo
Copy link

Fair enough.

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

Successfully merging this pull request may close these issues.

[css] provide property suggestion in @media query [css] Autocomplete for media queries
4 participants