fix: mini icons

This commit is contained in:
hypercross 2026-03-25 17:36:19 +08:00
parent 64ac6c4516
commit 3cd8cc54b7
2 changed files with 6 additions and 1 deletions

View File

@ -40,7 +40,7 @@ const marked = new Marked()
renderer(token) { renderer(token) {
if (!token.meta.name) { if (!token.meta.name) {
const style = globalIconPrefix ? `style="--icon-src: url('${globalIconPrefix}/${token.text}.png')"` : ''; const style = globalIconPrefix ? `style="--icon-src: url('${globalIconPrefix}/${token.text}.png')"` : '';
return `<icon ${style} class="icon-${token.text}"></icon>`; return `<icon ${style} class="icon-${token.text} ${token.attrs?.class || ""}"></icon>`;
} }
return false; return false;
} }

View File

@ -13,6 +13,11 @@ icon, pull{
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
icon.mini{
width: 1em;
height: 1em;
vertical-align: bottom;
}
pull{ pull{
margin-right: -.5em; margin-right: -.5em;
width: 0; width: 0;