code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Problem with copy button overlapping text #411

Open dsalazarm opened 8 months ago

dsalazarm commented 8 months ago

Hello: We're seeing a weird behavior when the 1st line of code is long enough, the copy button overlaps with the text.

I'm attaching some screenshots:

I found that there is a 0 value for top in this: https://github.com/code-hike/codehike/blob/14554f722aecfcada4e93eb6e786de052ddc3681/packages/mdx/src/smooth-code/smooth-container.tsx#L134

if we add, let's say 5px to this property, it will look like this:

What do you think its the best option for this?

I can create a PR once we make a final decission

Nctawade commented 8 months ago

I think last one "ch-code" makes more sense