Skip to content

Background is forced to white|black #16

@nelson6e65

Description

@nelson6e65

Background (--color-canvas-default) is forced to black and white.

To use on editors, like Visual Studio Code, not all themes are black|white.

I know I can publish my own style, but it would be nice to have an extra CSS file published with transparent background in the official CDN. Like:

/* github-markdown-with-transparent-background.css */

:root {
  --color-canvas-default: #00000000;
}

.markdown-body {
  background-color: var(--color-canvas-default);
}

@media (prefers-color-scheme: dark) {
  .markdown-body {
    --color-canvas-default: #00000000;
  }
}

@media (prefers-color-scheme: light) {
  .markdown-body {
    --color-canvas-default: #ffffff00;
  }
}

So we can import it at the end, like:

imagen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions