diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-03-07 20:11:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 20:11:24 +0800 |
commit | 4c59c8c7682da31410decba3bd868fde5116e073 (patch) | |
tree | 3503efe79ceb5a266edf86ed23ce5ab3ba07975e /web_src/less/features | |
parent | c84238800bb743181582f043ece9b44fef233c95 (diff) | |
download | gitea-4c59c8c7682da31410decba3bd868fde5116e073.tar.gz gitea-4c59c8c7682da31410decba3bd868fde5116e073.zip |
Fix various ImageDiff/SVG bugs (#23312)
Replace #23310, Close #19733
And fix various UI problems, including regressions from #22959 #22950
and more.
## SVG Detection
The old regexp may mismatch non-SVG files. This PR adds new tests for
those cases.
## UI Changes
### Before
![image](https://user-images.githubusercontent.com/2114189/222967716-f6ad8721-f46a-4a3f-9eb0-a89e488d3436.png)
![image](https://user-images.githubusercontent.com/2114189/222967780-8af8981a-e69d-4304-9dc4-0235582fa4f4.png)
### After
![image](https://user-images.githubusercontent.com/2114189/222967575-c21c23d4-0200-4e09-aac3-57895e853000.png)
![image](https://user-images.githubusercontent.com/2114189/222967585-8b8da262-bc96-441a-9851-8d3845f2659d.png)
![image](https://user-images.githubusercontent.com/2114189/222967595-58d9bea5-6df4-41fa-bf8a-86704117959d.png)
![image](https://user-images.githubusercontent.com/2114189/222967608-38757c1a-b8bd-4ebf-b7a8-3b30edb7f303.png)
![image](https://user-images.githubusercontent.com/2114189/222967623-9849a339-6fae-4484-8fa5-939e2fdacbf5.png)
![image](https://user-images.githubusercontent.com/2114189/222967633-4383d7dd-62ba-47a3-8c10-86f7ca7757ae.png)
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src/less/features')
-rw-r--r-- | web_src/less/features/imagediff.less | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web_src/less/features/imagediff.less b/web_src/less/features/imagediff.less index a9ba7f8c8f..07763c15e1 100644 --- a/web_src/less/features/imagediff.less +++ b/web_src/less/features/imagediff.less @@ -1,6 +1,6 @@ .image-diff-container { text-align: center; - padding: 30px 0; + padding: 1em 0; img { border: 1px solid var(--color-primary-light-7); @@ -22,6 +22,7 @@ display: inline-block; line-height: 0; vertical-align: top; + margin: 0 1em; .side-header { font-weight: bold; @@ -98,7 +99,7 @@ } input { - width: 300px; + max-width: 300px; } } } |