mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
This sets width and height attributes for our SVG icons. This helps avoid a flash of unstyled SVG icons, which makes them appear gigantic in some situations (live reload in dev environments may be the most obvious). The width/height here will be overridden by existing CSS, because inline presentation attributes have lower priority than other CSS. We already set the same `1em` width/height on `.svg-icon` in our `svg.scss` file... so there shouldn't be any significant impact beyond making some loading situations more pleasant! Some reference on this situation: https://www.sarasoueidan.com/blog/svg-style-inheritance-and-fousvg/ Before: <img width="1364" height="1422" alt="image" src="https://github.com/user-attachments/assets/023e8a9b-718f-425e-8e76-eff07e91389b" /> After: <img width="1320" height="1360" alt="image" src="https://github.com/user-attachments/assets/4754b092-c62c-4fd3-bde9-c952b6020d2b" /> |
||
|---|---|---|
| .. | ||
| assets | ||
| config | ||
| db/migrate | ||
| lib/discourse_local_dates | ||
| spec | ||
| test/javascripts | ||
| package.json | ||
| plugin.rb | ||
| tsconfig.json | ||