tailwindcss.com icon indicating copy to clipboard operation
tailwindcss.com copied to clipboard

Fix/feature copy to clipboard #2271

Open Md-Mahir-Asef opened this issue 5 months ago • 7 comments

This pull request adds Copy button to all code snippets in the tailwindcss.com documentation. Here are some screen shorts.

Before:

Screenshot 2025-06-14 203340 Screenshot 2025-06-14 203401 Screenshot 2025-06-15 101209

After:

Screenshot 2025-06-14 203044 Screenshot 2025-06-14 203117 Screenshot 2025-06-14 203218

Md-Mahir-Asef avatar Jun 15 '25 04:06 Md-Mahir-Asef

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2025 3:29pm

vercel[bot] avatar Jun 15 '25 04:06 vercel[bot]

Okay, but with this, we're also copying the Shiki comments to the clipboard, and it takes more extra work to achieve the desired result - as you've seen in the previous PRs.

rozsazoltan avatar Jun 15 '25 07:06 rozsazoltan

Dear sir, thanks to address my issue. I will try to resolve the issue. Have a good day!

Md-Mahir-Asef avatar Jun 15 '25 13:06 Md-Mahir-Asef

Dear Sir, my code no longer copies the Shiki comments to the clipboard.

Md-Mahir-Asef avatar Jun 15 '25 15:06 Md-Mahir-Asef

I don't think this covers all comments and all cases - perhaps the other PR had the same solution?

rozsazoltan avatar Jun 15 '25 15:06 rozsazoltan

I have tested all the code examples in the documentation as thoroughly as possible and obtained the correct output in each case. I would be grateful if you could kindly point out any specific case that I may have overlooked.

Md-Mahir-Asef avatar Jun 16 '25 04:06 Md-Mahir-Asef

For example, here you remove an empty line:

  • https://tailwindcss-5j4iy21rc-tailwindlabs.vercel.app/docs/upgrade-guide#using-vite

Or, in the case of diffs, you also copy the deleted lines to the clipboard.

rozsazoltan avatar Jun 16 '25 08:06 rozsazoltan

I'm building off of #2279 so going to close this one — thanks though!

thecrypticace avatar Jul 08 '25 18:07 thecrypticace