GithubHelp home page GithubHelp logo

Comments (3)

2bndy5 avatar 2bndy5 commented on July 26, 2024

hardcoded colors that could be made agnostic of BG color:

The following is subject to #733:

border: 1px solid #e0e0e0;

from nbsphinx.

mgeier avatar mgeier commented on July 26, 2024

Thanks for reporting this!

nbsphinx is not supporting dark themes yet (see also #635).

I would like to fix this at some point, but I'm still too confused about how to do that. Sphinx has hardly any support for a dark theme, and many third party themes use quite different technologies for their dark themes. I think this makes it basically impossible to be working correctly on all themes.

The idea with transparency sounds nice, but I guess it can only be used in a few situation and not as a general strategy, right?

For comparison, this is how the JupyterLab dark theme looks like:

image

from nbsphinx.

2bndy5 avatar 2bndy5 commented on July 26, 2024

Sphinx has hardly any support for a dark theme

I don't think dark mode is a Sphinx support issue. It can be done with HTML and CSS templates.

many third party themes use quite different technologies for their dark themes

Sort of. From what I've seen, light/dark modes are typically toggled using an attribute on the DOM <body>. The only thing that is really inconsistent is the name of the attribute that is used.

CSS has a media feature that can be used to compensate for these scenarios, but it might not fit all themes.

The idea with transparency sounds nice, but I guess it can only be used in a few situation and not as a general strategy, right?

If you absolutely want the color to be opaque, then it is harder to satisfy this. But I would recommend the aforementioned CSS media feature when transparency isn't preferrable.

Changing the foreground color makes sense, but it should really only be done if changing the background color to something opaque (as is done for certain rows of tables in nbsphinx).

from nbsphinx.

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.