Comments (2)
This is a known problem, which occurs because WebView will apply VSCode's theme CSS by default. I have considered implementing a general method to solve the problem many times in the past, but many methods do not work well in most cases. I will explain the problem:
Strictly speaking, this should be a problem that should be solved on the MediaWiki website you are logging in, that is, the website you are on should support the dark theme. If this is the case, when your VSCode uses a dark theme, the extension will try to call the website to return the CSS of the dark theme. The light theme of VSCode corresponds to the light theme of the website.
This method seems great, so I originally planned to do it the same way. Unfortunately, many websites I have learned do not achieve this. They only support light themes. Even Wikipedia does not have dark themes, unless users modify user CSS or use browser extensions.
So at present, it would be futile for me to add such a setting, and users simply cannot get the correct theme CSS. As the most direct and effective alternative, and also the worst, is to provide an option to directly turn off the default CSS provided by WebView in VSCode. Of course in this case you will probably get a preview page that will always be a light theme.
In my original plan, I actually left this problem to the user. Users can freely switch between light and dark themes of VSCode to get a normal and unified theme style. And I plan to provide a more accessible option in the sidebar in a major future version to allow users to change the WebView theme.
However, due to various reasons, including my busy work, this project has been slow. So after you raise this issue, I might consider temporarily providing such an option to turn off the default CSS.
from wikitext-vscode-extension.
Thanks a lot for taking the time to explain the problem. That makes a lot of sense. Even if dark mode is not feasible for wiki pages with math, I think any user editing such a page would greatly appreciate any (even temporary) fix.
Big fan of the extension!
from wikitext-vscode-extension.
Related Issues (20)
- There are always extra `"` in the preview HOT 3
- Error when pushing changes HOT 2
- can't pull page HOT 2
- Editing Scribunto module - Cannot read properties of undefined (reading 'join');
- Update the extensions to Web extensions
- Wikimedia Two-factor_authentication HOT 2
- Web Extension Error: `TypeError: Failed to fetch`
- Add basic authentication to settings. HOT 3
- Bracket highlighting not working in v3.7.0 HOT 11
- Credential requirement HOT 1
- Commands resolving to Not Found HOT 5
- Citation Snippets for free! HOT 1
- Treat `|}` as table closure only at start of line HOT 5
- Error on launching preview HOT 7
- Braces highlight mismatch HOT 2
- Highlight error caused by `{{` in the HTML tag HOT 1
- Bug: preview doesn't work HOT 7
- Better edit summaries? HOT 3
- Extension committing edits while logged out HOT 8
- Private wiki support? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikitext-vscode-extension.