Code Monkey home page Code Monkey logo

Comments (2)

Frederisk avatar Frederisk commented on May 28, 2024

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.

ARLundborg avatar ARLundborg commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.