Skip to content

Conversation

@Ahmed-aleryani
Copy link

@Ahmed-aleryani Ahmed-aleryani commented Jan 12, 2026

Summary

Adds a missing example section for the overflow-clip utility in the overflow documentation.

Changes

  • Added new "Clipping content that overflows" example section
  • Included interactive playground example with clipped profile image
  • Added HTML code snippet with proper syntax highlighting
  • Positioned the example logically between overflow-hidden and overflow-auto
  • Included explanation of the difference between overflow-clip and overflow-hidden

Issue

Closes #2246

Testing

✅ Verified locally on development server
✅ Interactive example renders correctly
✅ Profile image clips at container boundary as expected
✅ Code snippet displays properly with syntax highlighting
✅ Dark mode compatibility confirmed
✅ Example follows existing overflow documentation patterns

What was added

The overflow-clip utility was listed in the API table but had no dedicated example section. Users couldn't see how it worked or understand the difference from overflow-hidden.

Now includes:

  • Visual demonstration with clipped content
  • Code example: <div class="overflow-clip ...">
  • Explanation: "Unlike overflow-hidden, overflow-clip doesn't create a new formatting context and may offer better performance in some cases."

@vercel
Copy link

vercel bot commented Jan 12, 2026

@Ahmed-aleryani is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

Add dedicated example section demonstrating the overflow-clip utility,
showing the visual difference from overflow-hidden and explaining
the performance benefits.

Fixes tailwindlabs#2246
@Ahmed-aleryani Ahmed-aleryani force-pushed the add-overflow-clip-example branch from 6d93f2d to c4665e1 Compare January 12, 2026 00:44
@Ahmed-aleryani
Copy link
Author

@thecrypticace Added visual example for overflow-clip. Let me know if any changes needed!

@Ahmed-aleryani
Copy link
Author

@adamwathan Small missing documentation for overflow-clip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "overflow-clip" class explanation in layout/overflow

1 participant