Giter Site home page Giter Site logo

Comments (5)

Lexachoc avatar Lexachoc commented on August 23, 2024 2

ah sorry about that! Use the below one instead! (I have also edited my previous reply)

.gdesc-inner {
    background: rgba(0,0,0,.92) !important;
}

.gslide-title, .gslide-desc {
    color: #fff !important;
}

For comparison, I changed the caption background to red so you can see that the background is fixed in both modes:
image
image

from mkdocs-glightbox.

Lexachoc avatar Lexachoc commented on August 23, 2024 1

You can modify the css (for example, using extra.css)

load it in the mkdocs.yml

extra_css:
  - stylesheets/extra.css

and then in extra.css

.gdesc-inner {
    background: rgba(0,0,0,.92) !important;
}

.gslide-title, .gslide-desc {
    color: #fff !important;
}

The result:
image

BTW, if you are using mkdocs-material:
see: https://squidfunk.github.io/mkdocs-material/reference/images/?h=images#light-and-dark-mode

You can switch between light and dark mode, and the result will be:
Light mode:
image

Dark mode:
image

For me, the default color of mkdocs-glightbox works well because I prepare the images with light and dark tones that match the light/dark modes.

from mkdocs-glightbox.

patrislav1 avatar patrislav1 commented on August 23, 2024

Thank you! Your CSS example works in default / light mode but doesn't change the colors in dark mode. Is it possible to set the colors to fixed values regardless of selected color scheme?

from mkdocs-glightbox.

psifertex avatar psifertex commented on August 23, 2024

It would be better if glightbox rather could just use the page's background colors instead of having to hard code is own single background color. This seems like it would just be a better default.

from mkdocs-glightbox.

patrislav1 avatar patrislav1 commented on August 23, 2024

ah sorry about that! Use the below one instead! (I have also edited my previous reply)

Works for me, thanks a lot!

from mkdocs-glightbox.

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.