You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/web_src/js
silverwind a96c73f979
Remove svg.svg class, restore .rss-icon (#24667)
Fix regression from https://github.com/go-gitea/gitea/pull/24476 where
the `svg.svg` class misaligns SVG icons across the site and streched
buttons unintentionally in vertical height.

Before (button 30.3px):
<img width="157" alt="Screenshot 2023-05-11 at 22 09 42"
src="https://github.com/go-gitea/gitea/assets/115237/0fd137ab-ab52-4cf8-afca-c45776d526d0">

After (button 30px):
<img width="160" alt="Screenshot 2023-05-11 at 22 09 59"
src="https://github.com/go-gitea/gitea/assets/115237/4b741f4b-0fd2-4fae-9bee-16a7deb098e8">

[vertical-align:
middle](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align)
is not suitable to align icons to text because

> Aligns the middle of the element with the baseline plus half the
x-height of the parent.

Example of `vertical-align: middle` from MDN:

<img width="232" alt="Screenshot 2023-05-11 at 22 29 28"
src="https://github.com/go-gitea/gitea/assets/115237/179fb756-85a1-4cab-8219-1a4958f333e2">

So I think the
[existing](365bb77a54/web_src/css/svg.css (L3))
`vertical-align: text-top` is generally still the best bet:

<img width="241" alt="Screenshot 2023-05-11 at 22 34 24"
src="https://github.com/go-gitea/gitea/assets/115237/0cd6edf5-12c0-4bdb-8771-a900f5ba2d35">

Co-authored-by: Giteabot <teabot@gitea.io>
2 years ago
..
components Remove svg.svg class, restore .rss-icon (#24667) 2 years ago
features Make repo migration cancelable and fix various bugs (#24605) 2 years ago
markup Fix math and mermaid rendering bugs (#24049) 2 years ago
modules Only show one tippy at a time (#24648) 2 years ago
standalone Add new JS linter rules (#17699) 3 years ago
test Improve emoji and mention matching (#24255) 2 years ago
utils Improve "goto issue by number" button (#24577) 2 years ago
webcomponents Refactor locale number (#24134) 2 years ago
bootstrap.js Improve template system and panic recovery (#24461) 2 years ago
index.js Improve "goto issue by number" button (#24577) 2 years ago
jquery.js Upgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055) 5 years ago
serviceworker.js Fix serviceworker output file and misc improvements (#11562) 5 years ago
svg.js Fix EasyMDE toolbar (#24489) 2 years ago
svg.test.js Improve `<SvgIcon>` to make it output `svg` node and optimize performance (#23570) 2 years ago
utils.js Modify luminance calculation and extract related functions into single files (#24586) 2 years ago
utils.test.js Introduce GiteaLocaleNumber custom element to handle number localization on pages. (#23861) 2 years ago