SyntaxUI/syntaxui

[BUG]: expand/collapse button broken hover effect

Closed this issue ยท 4 comments

Description ๐Ÿ“

When hovering over the expand/collapse button the text under it turns unreadable

Link ๐Ÿ”—

https://syntaxui.com/docs/animations/skewed-infinite-scroll

Steps to Reproduce ๐Ÿ”„

  1. Go to https://syntaxui.com/docs/animations/skewed-infinite-scroll
  2. Scroll down to the expand button in the code view
  3. Hover over it

Screenshots ๐Ÿ“ธ

image
bug

Expected Behavior ๐Ÿค”

The button has a hover effect thats inline with the branding

Actual Behavior ๐Ÿ˜ฑ

The hover effect is applied to the background and makes the code under it unreadable

Environment ๐ŸŒ

Firefox - Windows 11

Additional Information โ„น๏ธ

No response

I got a fix ready for this once you approve @Ansub!

@mezotv

in src/components/code/CodeGroup.tsx, in this button:

<Button className="w-xs absolute bottom-0 left-0 right-0 block rounded-2xl bg-transparent p-0 text-sm font-medium text-white"
  onClick={() => setMinimized(!minimized)}
>
  {minimized ? 'Expand' : 'Collapse'}
</Button>

adding w-full to the className instead of w-xs will solve the centering issue in firefox. This way we can make sure that it's centered on all browsers.

adding w-full to the className instead of w-xs will solve the centering issue in firefox. This way we can make sure that it's centered on all browsers.

I made sure to add that, thank you!

fixed here: 7118b8b