0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-local-dates/test/javascripts
Kris b117a89410
UX: set default dimensions on SVG icons (#37115)
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"
/>
2026-01-14 12:47:39 -05:00
..
acceptance FIX: Respect custom date format selection in local dates (#36860) 2025-12-24 16:42:33 +01:00
helpers DEV: Extract a test helper in local-dates (#29196) 2024-10-15 10:27:42 +02:00
integration FIX: Preserve all date attributes in rich text editor (#36781) 2025-12-24 14:01:52 +01:00
lib DEV: Fix no-loose-assertions lint (#29965) 2024-11-28 11:22:27 +01:00
unit UX: set default dimensions on SVG icons (#37115) 2026-01-14 12:47:39 -05:00