From 27c3942515c0ee1b036339d14508896842d3a145 Mon Sep 17 00:00:00 2001 From: Ahmed Aleryani Date: Mon, 12 Jan 2026 02:14:07 +0200 Subject: [PATCH] Add overflow-clip documentation example Add dedicated example section demonstrating the overflow-clip utility, showing the visual difference from overflow-hidden and explaining the performance benefits. Fixes #2246 --- src/docs/overflow.mdx | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/docs/overflow.mdx b/src/docs/overflow.mdx index a074a86cd..e1bded1d9 100644 --- a/src/docs/overflow.mdx +++ b/src/docs/overflow.mdx @@ -91,6 +91,38 @@ Use the `overflow-hidden` utility to clip any content within an element that ove +### Clipping content that overflows + +Use the `overflow-clip` utility to clip any content within an element that overflows the bounds of that element: + +
+ + + { +
+ +
+ Andrew Alfred + Technical advisor +
+
+ } +
+ +```html + +
+ +
+``` + +
+ +Unlike `overflow-hidden`, `overflow-clip` doesn't create a new formatting context and may offer better performance in some cases. + ### Scrolling if needed Use the `overflow-auto` utility to add scrollbars to an element in the event that its content overflows the bounds of that element: