Skip to content

Add basic media query auto complete support#443

Merged
aeschli merged 8 commits into
microsoft:mainfrom
Legend-Master:media-query-auto-complete
Jun 2, 2025
Merged

Add basic media query auto complete support#443
aeschli merged 8 commits into
microsoft:mainfrom
Legend-Master:media-query-auto-complete

Conversation

@Legend-Master

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

Copy link
Copy Markdown
Contributor

@aeschli

aeschli commented Jun 2, 2025

Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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

Legend-Master commented Jun 14, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown

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