Replace imgage diff png background pattern with gradient (#3870)
Made the checkerboard background be more flexible in terms of scale and coloring. Provides dark theme for image diff.
I suppose these colors should not be re-used for a color-picker for a example, because it's usually more convenient to always have it in the light mode.
## Test
* go to e6d3623c7e
* or migrate https://next.forgejo.org/image-test/image-diff to your local instance
## Before/after

(Old any - New Forgejo dark - New Gitea dark - New Forgejo/Gitea light)
---
Gradient property is taken from [here](https://www.reddit.com/r/css/comments/u08pf3/how_to_make_a_checkerboard_using_background/).
[CSS compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/conic-gradient#browser_compatibility): about four years of browser versions.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3870
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
This commit is contained in:
parent
509a077ec0
commit
da12320a0c
6 changed files with 16 additions and 1 deletions
|
@ -13,7 +13,9 @@
|
|||
|
||||
.image-diff-container img {
|
||||
border: 1px solid var(--color-primary-light-7);
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAG0lEQVQYlWN4+vTpf3SMDTAMBYXYBLFpHgoKAeiOf0SGE9kbAAAAAElFTkSuQmCC") right bottom var(--color-primary-light-7);
|
||||
--gradient: conic-gradient(var(--checkerboard-color-1) 90deg, var(--checkerboard-color-2) 90deg 180deg, var(--checkerboard-color-1) 180deg 270deg, var(--checkerboard-color-2) 270deg);
|
||||
background: var(--gradient);
|
||||
background-size: 20px 20px;
|
||||
}
|
||||
|
||||
.image-diff-container .before-container {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue