mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 19:11:58 +01:00
0a7767eaaa
Adds a feature similar to this https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/ , by adding styles to elements which `src` or `href` attribute ends with `#light-mode-only` or `#dark-mode-only`. To improve compability, the github variants with the `gh-` prefix are also contained. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3985 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org> Co-committed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
13 lines
334 B
CSS
13 lines
334 B
CSS
.markup [src$="#gh-light-mode-only"],
|
|
.markup [src$="#light-mode-only"],
|
|
.markup [href$="#gh-light-mode-only"],
|
|
.markup [href$="#light-mode-only"] {
|
|
display: none;
|
|
}
|
|
|
|
.markup [src$="#gh-dark-mode-only"],
|
|
.markup [src$="#dark-mode-only"],
|
|
.markup [href$="#gh-dark-mode-only"],
|
|
.markup [href$="#dark-mode-only"] {
|
|
display: unset;
|
|
}
|