-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
[FEATURE] Use future Code API to detect preferred scheme #40
Comments
Thank you for opening the issue! I will try to use the CSS media query solution today, but would love to see that the VS Code team will implement the electron native solution ASAP. |
@VideoPlayerCode How have you accessed the |
You're welcome. Your extension looks great by the way. Hmm. With Help - Show Developer Tools. I did it in the console there. Hmm. I really hope there is some way for extensions to access window. Although window is just used for guaranteed namespacing. In JS browsers, that prefix is optional. So try calling Edit: I was reading up on extensions. Seems each runs in a Node subprocess without Electron. Hence no DOM and no Electron API. So it may actually currently be impossible to call Edit2: Oh no. The main thread I linked to now has confirmation that only core code can access the two APIs. There is talk of adding switching to core. I hope they also expose matchMedia or at least the dark mode check for extensions. Let's keep watching the discussion. Edit3: Oh, you got involved and offered to help them. Awesome! <3 |
Hi again @muuvmuuv, the vscode ticket has died after your post ten days ago. What are your current plans? Could you share your plans with the official ticket, or if you don't have time, let them know so someone else can work on it. :-) |
As I'm planning to expose an API to VS Code that sends the preferred scheme or a getter which returns it. I'll change the purpose of this issue a little: |
That's great news. I replied in the vscode discussion. :-) |
Hey everyone. Your extension looks nice, but it's a shame that it's mac-only.
Read the bottom of this comment:
microsoft/vscode#61519 (comment)
There is a JavaScript query, supported by V8/Electron (VSCode's GUI engine), which tells you whether dark mode is enabled or disabled on the system.
So you can rip out all the ugly macOS-specific code and replace it with this. :-)
The text was updated successfully, but these errors were encountered: