Skip to content

Commit 7e2ce40

Browse files
authored
Merge pull request #46 from tailwindcss/add-scrolling-docs
Add scrolling-touch/auto docs
2 parents bab25dc + 5e3da15 commit 7e2ce40

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

docs/source/docs/overflow.blade.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ title: "Overflow"
1818

1919
<div class="border-t border-grey-lighter">
2020
<table class="w-full text-left" style="border-collapse: collapse;">
21-
<colgroup>
22-
<col class="w-1/5">
23-
<col class="w-1/4">
24-
<col>
25-
</colgroup>
2621
<thead>
2722
<tr>
2823
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Class</th>
@@ -32,35 +27,45 @@ title: "Overflow"
3227
</thead>
3328
<tbody class="align-baseline">
3429
<tr>
35-
<td class="p-2 border-t border-smoke font-mono text-xs text-purple-dark">.overflow-visible</td>
36-
<td class="p-2 border-t border-smoke font-mono text-xs text-blue-dark">overflow: visible;</td>
37-
<td class="p-2 border-t border-smoke text-sm text-grey-darker">Prevent content within an element from being clipped.</td>
30+
<td class="p-2 border-t border-smoke font-mono text-xs text-purple-dark whitespace-no-wrap">.overflow-visible</td>
31+
<td class="p-2 border-t border-smoke font-mono text-xs text-blue-dark whitespace-no-wrap">overflow: visible;</td>
32+
<td class="p-2 border-t border-smoke text-sm text-grey-darker">Don't clip content that overflows the element.</td>
3833
</tr>
3934
<tr>
40-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.overflow-auto</td>
41-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">overflow: auto;</td>
35+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.overflow-auto</td>
36+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">overflow: auto;</td>
4237
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Add scrollbars to an element if needed.</td>
4338
</tr>
4439
<tr>
45-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.overflow-hidden</td>
46-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">overflow: hidden;</td>
40+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.overflow-hidden</td>
41+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">overflow: hidden;</td>
4742
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Clip any content that overflows the element.</td>
4843
</tr>
4944
<tr>
50-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.overflow-x-scroll</td>
51-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">overflow-x: auto;</td>
45+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.overflow-x-scroll</td>
46+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">overflow-x: auto;</td>
5247
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Allow horizontal scrolling if needed.</td>
5348
</tr>
5449
<tr>
55-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.overflow-y-scroll</td>
56-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">overflow-y: auto;</td>
50+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.overflow-y-scroll</td>
51+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">overflow-y: auto;</td>
5752
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Allow horizontal scrolling if needed.</td>
5853
</tr>
5954
<tr>
60-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.overflow-scroll</td>
61-
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">overflow: scroll;</td>
55+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.overflow-scroll</td>
56+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">overflow: scroll;</td>
6257
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Add scrollbars to an element.</td>
6358
</tr>
59+
<tr>
60+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.scrolling-touch</td>
61+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">-webkit-overflow-scrolling: touch;</td>
62+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Use momentum-based scrolling on touch devices.</td>
63+
</tr>
64+
<tr>
65+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.scrolling-auto</td>
66+
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">-webkit-overflow-scrolling: auto;</td>
67+
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Use "regular" scrolling on touch devices.</td>
68+
</tr>
6469
</tbody>
6570
</table>
6671
</div>
@@ -161,6 +166,13 @@ Use `.overflow-scroll` to add scrollbars to an element. Unlike `.overflow-auto`,
161166
@endslot
162167
@endcomponent
163168

169+
### Momentum-based scrolling on touch devices
170+
171+
Use `.scrolling-touch` to use momentum-based scrolling on touch devices. This causes content to continue scrolling for a while after finishing the scroll gesture and removing your finger from the touchscreen. The speed and duration of the continued scrolling is proportional to how vigorous the scroll gesture was.
172+
173+
### Regular scrolling on touch devices
174+
175+
Use `.scrolling-auto` to use "regular" scrolling on touch devices. This causes scrolling to immediately cease when you remove your finger from the touchscreen.
164176

165177
## Responsive
166178

0 commit comments

Comments
 (0)