Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions snippets/copy-prompt-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,15 @@ export const CopyPromptButton = () => {
backgroundColor: '#111',
border: '1px solid rgba(255, 255, 255, 0.08)',
cursor: 'pointer',
transition: 'background-color 0.15s ease, border-color 0.15s ease',
textDecoration: 'none',
transition: 'text-decoration 0.15s ease',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Transition on non-animatable text-decoration-line is ineffective

Low Severity

The transition: 'text-decoration 0.15s ease' declaration is dead code. CSS cannot transition text-decoration-line (which is what changes between none and underline). Only text-decoration-color and text-decoration-thickness are animatable sub-properties. The underline will still appear and disappear on hover, but it snaps instantly with no smooth transition, making this line misleading.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f5e30a8. Configure here.

fontFamily: 'inherit',
}}
onMouseEnter={(e) => {
e.currentTarget.style.backgroundColor = '#222';
e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.15)';
e.currentTarget.style.textDecoration = 'underline';
}}
onMouseLeave={(e) => {
e.currentTarget.style.backgroundColor = '#111';
e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)';
e.currentTarget.style.textDecoration = 'none';
}}
>
{copied ? (
Expand Down
Loading