mirror of
https://gitea.com/gitea/docs.git
synced 2026-06-11 04:31:26 +00:00
GitHub-like theme-based image display (#372)
This commit is contained in:
@@ -76,6 +76,33 @@ It will be rendered with issue titles to:
|
||||
* the other issue title (#456)
|
||||
```
|
||||
|
||||
## Theme-based image display
|
||||
|
||||
Gitea supports the GitHub-like theme-based image display. Supported syntax:
|
||||
|
||||
* Use Markdown image
|
||||
|
||||
```
|
||||

|
||||
```
|
||||
|
||||
* Use `<img>` HTML tag
|
||||
|
||||
```
|
||||
<img src="my-light.png#gh-light-mode-only" height="120" width="120"/>
|
||||
<img src="my-dark.png#gh-dark-mode-only" height="120" width="120"/>
|
||||
```
|
||||
|
||||
* Use `<picture>` with `<source media>` (only works for themes with "auto" color preference)
|
||||
|
||||
```
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="my-dark.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="my-light.png">
|
||||
<img src="my-light.png">
|
||||
</picture>
|
||||
```
|
||||
|
||||
## Math expressions
|
||||
|
||||
Gitea supports GitHub-like math expression formatting.
|
||||
|
||||
Reference in New Issue
Block a user