Skip to content

Fix SVG size calulation, only use style attribute#36133

Merged
lafriks merged 4 commits intogo-gitea:mainfrom
silverwind:svgsize
Dec 12, 2025
Merged

Fix SVG size calulation, only use style attribute#36133
lafriks merged 4 commits intogo-gitea:mainfrom
silverwind:svgsize

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Dec 11, 2025

Fixes: #35863

The old code had a conflict between using HTML attributes vs. style properties where the style was overriding the previously set HTML attributes:

<img width="300" height="277.02439470988946" style="width: 275px; height: 0px;">

I made it so in all cases only style properties are used and the previous width/height values are now set via style. Also I did a number of much-needed typescript improvements to the file.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 11, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 12, 2025
@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Dec 12, 2025

Made a small change for the transparent image in #35863

Details image

@wxiaoguang wxiaoguang added backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.25 labels Dec 12, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 12, 2025
@lafriks lafriks merged commit 4cbcb91 into go-gitea:main Dec 12, 2025
23 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Dec 12, 2025
lafriks pushed a commit that referenced this pull request Dec 12, 2025
Backport of #36133, only the
bugfix part.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@wxiaoguang wxiaoguang deleted the svgsize branch December 12, 2025 07:40
@silverwind
Copy link
Copy Markdown
Member Author

Made a small change for the transparent image

BTW this mask image should be made darker in dark theme, I will probably follow up on that later.

zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 15, 2025
* giteaofficial/main:
  Remove undocumented support of signing key in the repository git configuration file (go-gitea#36143)
  Enable gocheckcompilerdirectives linter (go-gitea#36156)
  Fix code highlighting on blame page (go-gitea#36157)
  Check user visibility when redirecting to a renamed user (go-gitea#36148)
  Fix bug when viewing the commit diff page with non-ANSI files (go-gitea#36149)
  Refactor `FileTreeItem` type (go-gitea#36137)
  Fix various bugs (go-gitea#36139)
  Fix issue close timeline icon (go-gitea#36138)
  Add permissions to`files-changed` jobs (go-gitea#36142)
  Add explicit permissions to all actions workflows (go-gitea#36140)
  Bump `actions/checkout` to v6 (go-gitea#36136)
  Hide RSS icon when viewing a file not under a branch (go-gitea#36135)
  Fix SVG size calulation, only use `style` attribute (go-gitea#36133)
  Add sorting/filtering to admin user search API endpoint (go-gitea#36112)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.25 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken render of some SVGs in diff page

5 participants