Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix highest rank tooltip being misaligned on mobile #11613

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Joehuu
Copy link
Member

@Joehuu Joehuu commented Nov 1, 2024

Before After
Screenshot 2024-10-31 at 8 19 26 PM Screenshot 2024-10-31 at 8 19 18 PM

Unsure if this is the correct fix. Wanted to keep the hover/click area width at least the label width, so one digits are still easy to hover/click.

<div className={`${bn}__label`}>{label}</div>
<div className={`${bn}__value`}>{value}</div>
{description != null && <div className={`${bn}__description`}>{description}</div>}
<div style={{ width: 'max-content' }}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks description area (like in kudosu section). just add align-items: flex-start to the value-display class instead.

Copy link
Member Author

@Joehuu Joehuu Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes the hover/click area confined to the rank (bad for - and one digits as described in OP). I've moved the description out of the new div.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see...? Although might as well position it at the bottom left instead (with data-tooltip-position).

Also, inlining css is generally avoided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Highest rank pop-up misaligned on mobile
2 participants