0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/plugins/discourse-local-dates
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
..
assets FIX: Respect custom date format selection in local dates (#36860) 2025-12-24 16:42:33 +01:00
config I18N: Update translations (#37056) 2026-01-12 15:18:57 +01:00
db/migrate FEATURE: allow customizing default timezone for email. (#32964) 2025-05-29 14:17:37 +10:00
lib/discourse_local_dates DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
spec FIX: Preserve all date attributes in rich text editor (#36781) 2025-12-24 14:01:52 +01:00
test/javascripts UX: set default dimensions on SVG icons (#37115) 2026-01-14 12:47:39 -05:00
package.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00
plugin.rb DEV: Remove unnecessary freeze calls (#35064) 2025-09-30 15:36:16 +02:00
tsconfig.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00