mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: add sm2x avatar class #7813
This commit is contained in:
@@ -102,6 +102,12 @@
|
||||
.user-icon-style(24px, 1.5rem);
|
||||
}
|
||||
|
||||
&.avatar-sm2x {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
.user-icon-style(48px, 1.5rem);
|
||||
}
|
||||
|
||||
&.avatar-md {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
classNames = classNames || '';
|
||||
|
||||
// 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;
|
||||
} 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;');
|
||||
|
||||
Reference in New Issue
Block a user