mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: add sm2x avatar class #7813
This commit is contained in:
@@ -102,6 +102,12 @@
|
|||||||
.user-icon-style(24px, 1.5rem);
|
.user-icon-style(24px, 1.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.avatar-sm2x {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
.user-icon-style(48px, 1.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
&.avatar-md {
|
&.avatar-md {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
classNames = classNames || '';
|
classNames = classNames || '';
|
||||||
|
|
||||||
// Validate sizes, handle integers, otherwise fall back to `avatar-sm`
|
// Validate sizes, handle integers, otherwise fall back to `avatar-sm`
|
||||||
if (['xs', 'sm', 'md', 'lg', 'xl'].includes(size)) {
|
if (['xs', 'sm', 'sm2x', 'md', 'lg', 'xl'].includes(size)) {
|
||||||
classNames += ' avatar-' + size;
|
classNames += ' avatar-' + size;
|
||||||
} else if (!isNaN(parseInt(size, 10))) {
|
} else if (!isNaN(parseInt(size, 10))) {
|
||||||
styles.push('width: ' + size + 'px;', 'height: ' + size + 'px;', 'line-height: ' + size + 'px;', 'font-size: ' + (parseInt(size, 10) / 16) + 'rem;');
|
styles.push('width: ' + size + 'px;', 'height: ' + size + 'px;', 'line-height: ' + size + 'px;', 'font-size: ' + (parseInt(size, 10) / 16) + 'rem;');
|
||||||
|
|||||||
Reference in New Issue
Block a user