Skip to content

Node.js based forum software built for the modern web

fix: line height in category icons

Barış Soner Uşaklı7bcdebe53214
diff --git a/public/src/modules/helpers.common.js b/public/src/modules/helpers.common.js
index 968245ba59..07fe08da2c 100644
--- a/public/src/modules/helpers.common.js
+++ b/public/src/modules/helpers.common.js
@@ -174,7 +174,8 @@ module.exports = function (utils, Benchpress, tx, relative_path) {
}
const sizeEscaped = escape(size);
const fontSize = (parseInt(size, 10) / 2) || 16;
- return `<span class="icon d-inline-flex justify-content-center align-items-center align-middle ${rounded}" style="${generateCategoryBackground(category)} width:${sizeEscaped}; height: ${sizeEscaped}; font-size: ${fontSize}px;">${category.icon ? `<i class="fa fa-fw ${escape(category.icon)}"></i>` : ''}</span>`;
+ const icon = category.icon ? `<i class="fa fa-fw ${escape(category.icon)}" style="line-height: ${sizeEscaped};"></i>` : '';
+ return `<span class="icon d-inline-flex justify-content-center align-items-center align-middle ${rounded}" style="${generateCategoryBackground(category)} width:${sizeEscaped}; height: ${sizeEscaped}; font-size: ${fontSize}px;">${icon}</span>`;
}
function buildCategoryLabel(category, tag = 'a', className = '') {