Magento Adminhtml Font and Markup
-
16-10-2019 - |
Question
I want to customize the Magento admin with an stylish icon font (think Wingdings).
In most cases it's easy enough to do entirely via CSS with the :before
pseudo-selector, outputting content:
that is relevant and is styled with the aforementioned font.
But, in some cases, I don't just want to prepend an icon - I want the entire text to be in said font. My first thought is to do it via translation file:
translate.csv:
"CMS","<span class='iconify'>CMS</span>"
So - while this may work - it feels like a hack and I'm concerned that the markup would be used in places I don't intend it to be. I'd really like some feedback on alternate methods of accomplishing this. Is there a better way?
Solution
As no answers suggested something more elegant, the approach I took was to inject the tag markup via the translation file:
"CMS","<span class='iconify'>CMS</span>"