feat(dashboard): improve mood widget readability with balanced two-line layout
- Increase conditions font size from 0.45rem to 0.6rem (33% larger) - Reduce mood emoji size from 1rem to 0.9rem for better proportion - Add font-weight: 600 to mood for better hierarchy - Improve line-height from 1 to 1.2 for readability - Reduce -webkit-line-clamp from 3 to 2 lines for conditions - Add slight opacity (0.9) to conditions for visual separation - Update onResize scaling to maintain balanced proportions (1.4rem / 0.9rem for larger widgets) - Increase mobile conditions size to 0.7rem with 1.3 line-height Result: Conditions text is now much more readable while maintaining good visual balance with the mood emoji in the compact 1x1 widget.
This commit is contained in:
@@ -103,15 +103,15 @@ export function registerUserMoodWidget(registry, dependencies) {
|
||||
const conditions = container.querySelector('.rpg-mood-conditions');
|
||||
if (!mood || !emoji || !conditions) return;
|
||||
|
||||
// Scale based on widget size
|
||||
// Scale based on widget size with balanced proportions
|
||||
if (newW >= 2 && newH >= 2) {
|
||||
// Larger widget: bigger text
|
||||
emoji.style.fontSize = '2rem';
|
||||
conditions.style.fontSize = '0.75rem';
|
||||
// Larger widget: scale up proportionally
|
||||
emoji.style.fontSize = '1.4rem';
|
||||
conditions.style.fontSize = '0.9rem';
|
||||
} else {
|
||||
// Compact 1x1: tight spacing
|
||||
emoji.style.fontSize = '1rem';
|
||||
conditions.style.fontSize = '0.45rem';
|
||||
// Compact 1x1: use CSS defaults (0.9rem / 0.6rem)
|
||||
emoji.style.fontSize = '';
|
||||
conditions.style.fontSize = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user