Skip to content
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

Different image for dark-mode #17

Open
alexnix opened this issue Mar 23, 2021 · 1 comment
Open

Different image for dark-mode #17

alexnix opened this issue Mar 23, 2021 · 1 comment

Comments

@alexnix
Copy link

alexnix commented Mar 23, 2021

Is it possible to load different image in markdown based on dark/light mode ? (ie. one logo for light mode, another logo for dark mode) ?

@lpose
Copy link

lpose commented May 18, 2021

You must add a variable that then from style modifies the content of the desired img tag

Example:

 light: {
            logo: 'url("assets/logo_light.png")',
          },
<style>
      .sidebar .app-name-link img {
        content: var(--logo, url(assets/logo_dark.png)); 
      }
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants