DEV Community

Reshmi Ashok Kumar
Reshmi Ashok Kumar

Posted on

LeetCode UI Bug: Misaligned "Accepted" Popup Border — Visual Demo & Fix

Image description

I noticed that the blue border is slightly misaligned to the right even though the top, bottom, and rounded corners are perfect.

🐞 The Bug:

  • When the "Accepted" popup appears, its blue blinking outline:
    • Is shifted ~1cm to the right(approx i'm saying for visualisation)
    • Has perfect height and rounded corners
    • But doesn't feel centered

🎥 I built a visual demo that compares:

❌ Buggy (LeetCode’s) ✅ Fixed (Corrected)
Shifted blue outline Centered properly

➡ Check it out here:

🔗 GitHub Repo with Demo

⚙️ Technical Insight:

This bug is simulated using:


css
.popup.buggy.show::after {
  transform: translateX(10px); /* 👈 causes the shift */
}
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
reshmi_a_k profile image
Reshmi Ashok Kumar

The bug has been fixed ✌️👌

Some comments may only be visible to logged-in visitors. Sign in to view all comments.