foundryvtt / dnd5e

An implementation of the 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com).
MIT License
336 stars 224 forks source link

Change the "d20-black.svg" icon from a svg to font like all the other button icons throughout the module and the PF2 module #3346

Open Stonesnake opened 7 months ago

Stonesnake commented 7 months ago

Line 7372 of the dnd5e.css

.sheet.journal-entry.dnd5e2-journal .journal-page-content .roll-link a > i.fa-dice-d20, .sheet.journal-entry.dnd5e2-journal .journal-page-content a.inline-roll > i.fa-dice-d20 { display: inline-block; width: 1em; height: 1em; background: url(../../icons/svg/d20-black.svg) no-repeat center / contain; vertical-align: middle;

I have been converting all of our modules to the DnD 3.0 module and we have a lot of advanced CSS in our modules.

One thing you should fix that is different from the rest of the modules and how PF2 does it is the "dice icon" in the buttons.

You are using SVG for the small dice icon rather than a font, like font awesome which you use in the PF2 buttons with icons/skills attached. When I redo the style of the button, it's very easy to make it different colors and such in PF2.

However, by making the dice icon a SVG rather than a font, it breaks. All of the other icons are fonts and that is the ONLY one I believe is an SVG instead.

I spent all day trying to make that SVG show up correctly on a dark colored button, but I just gave up.

Anyhow, I would suggest that you make the SVG a font and there is a d20 die you can use like PF2 does and it will work way better and be consistent with the other icons.

Fyorl commented 6 months ago

The SVG looks a lot better than the font-awesome d20 (in my opinion), which is why it's used. You can change the background: url() to point to any SVG you want, including an appropriately-coloured d20. Alternatively, we could inject a <dnd5e-icon> with an enricher or render hook which would allow its colour to be changed via the --icon-fill CSS variable, so I will re-frame this issue as a feature request for that.