Skip to content

Commit b30e77b

Browse files
Fix justify-stretch example (#2332)
Fixes #2327 The example code showed `flex` but `justify-stretch` only works on grid containers. In flex containers this is controlled with the `grow-*` class.
1 parent 8903a66 commit b30e77b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/docs/justify-content.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ Use the `justify-evenly` utility to justify items along the container's main axi
285285

286286
### Stretch
287287

288-
Use the `justify-stretch` utility to allow content items to fill the available space along the container's main axis:
288+
Use the `justify-stretch` utility to allow auto-sized content items to fill the available space along the container's main axis:
289289

290290
<Figure>
291291

292292
<Example>
293293
{
294294
<div className="grid grid-cols-1">
295295
<Stripes border className="col-start-1 row-start-1 rounded-lg" />
296-
<div className="col-start-1 row-start-1 grid grid-flow-col justify-stretch gap-4 rounded-lg font-mono text-sm leading-6 font-bold text-white">
296+
<div className="col-start-1 row-start-1 grid grid-cols-[4rem_auto_4rem] justify-stretch gap-4 rounded-lg font-mono text-sm leading-6 font-bold text-white">
297297
<div className="flex h-14 items-center justify-center rounded-lg bg-fuchsia-500">01</div>
298298
<div className="flex h-14 items-center justify-center rounded-lg bg-fuchsia-500">02</div>
299299
<div className="flex h-14 items-center justify-center rounded-lg bg-fuchsia-500">03</div>
@@ -304,7 +304,7 @@ Use the `justify-stretch` utility to allow content items to fill the available s
304304

305305
```html
306306
<!-- [!code classes:justify-stretch] -->
307-
<div class="flex justify-stretch ...">
307+
<div class="grid grid-cols-[4rem_auto_4rem] justify-stretch ...">
308308
<div>01</div>
309309
<div>02</div>
310310
<div>03</div>

0 commit comments

Comments
 (0)