Skip to content

Commit c0cbccf

Browse files
committed
Rough in content for new utilities in blog v3.3 blog post
1 parent 0026690 commit c0cbccf

File tree

1 file changed

+105
-3
lines changed

1 file changed

+105
-3
lines changed

src/pages/blog/tailwindcss-v3-3/index.mdx

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,118 @@ We've made it easy to do this for `font-feature-settings` for a while, but now y
299299

300300
<h2 id="new-list-style-image-utilities">New <code className="font-[number:inherit] font-[inherit] text-[length:inherit]">list-style-image</code> utilities</h2>
301301

302-
- Demo from docs (checkmark?)
302+
When the default browser list markers just don't cut it, you can now better express your creative side with the new `list-style-image` utilities.
303+
304+
<Example p="none">
305+
<div class="px-4 sm:px-0">
306+
<div class="mx-auto max-w-sm bg-white p-8 text-sm leading-6 text-slate-700 shadow-xl dark:bg-slate-800 dark:text-slate-400 sm:text-base sm:leading-7">
307+
<!--
308+
This is the raw version of the base64 encoded image below:
309+
<svg width="14" height="12" viewBox="0 0 14 12" xmlns="http://www.w3.org/2000/svg" fill="#38bdf8">
310+
<path fill-rule="evenodd" d="M13.685.153a.752.752 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" />
311+
</svg>
312+
-->
313+
<ul class="pl-4 text-slate-900 dark:text-slate-200 list-image-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxNCAxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsPSIjMzhiZGY4Ij48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy42ODUuMTUzYS43NTIuNzUyIDAgMCAxIC4xNDMgMS4wNTJsLTggMTAuNWEuNzUuNzUgMCAwIDEtMS4xMjcuMDc1bC00LjUtNC41YS43NS43NSAwIDAgMSAxLjA2LTEuMDZsMy44OTQgMy44OTMgNy40OC05LjgxN2EuNzUuNzUgMCAwIDEgMS4wNS0uMTQzWiIgLz48L3N2Zz4=')]">
314+
<li class="pl-2">5 cups chopped Porcini mushrooms</li>
315+
<li class="pl-2">1/2 cup of olive oil</li>
316+
<li class="pl-2">3lb of celery</li>
317+
</ul>
318+
</div>
319+
</div>
320+
</div>
321+
</Example>
322+
323+
```html
324+
<ul class="**list-image-[url(checkmark.png)]** ...">
325+
<li>5 cups chopped Porcini mushrooms</li>
326+
<!-- ... -->
327+
</ul>
328+
```
303329

304330
---
305331

306332
<h2 id="new-hyphens-utilities">New <code className="font-[number:inherit] font-[inherit] text-[length:inherit]">hyphens</code> utilities</h2>
307333

308-
- Demo from docs
334+
Say goodbye to ugly word-breaks with the new `hyphens-*` utilities. Don't be `&shy;`, give it a try!
335+
336+
These include `hyphens-manual` (what the browser does by default), `hyphens-auto` (allow the browser to automatically choose hyphenation points based on the language), and `hyphens-none` (disable hyphenation entirely).
337+
338+
<Example p="none">
339+
<div class="overflow-x-scroll sm:overflow-x-visible px-4">
340+
<div class="mx-auto max-w-xs bg-white shadow-xl p-12 text-slate-500 dark:bg-slate-800 dark:text-slate-400 ">
341+
<p class="hyphens-auto">Officially recognized by the Duden dictionary as the longest word in German, <span class="text-slate-900 font-medium dark:text-slate-200" lang="de"> KraftfahrzeugHaftpflichtversicherung</span> is a 36 letter word for motor vehicle liability insurance.</p>
342+
</div>
343+
</div>
344+
</Example>
345+
346+
```html
347+
<p class="**hyphens-auto** ..." **lang**="de">
348+
... KraftfahrzeugHaftpflichtversicherung is a ...
349+
</p>
350+
```
309351

310352
---
311353

312354
<h2 id="new-caption-side-utilities">New <code className="font-[number:inherit] font-[inherit] text-[length:inherit]">caption-side</code> utilities</h2>
313355

314-
- Demo from docs
356+
Did you know that CSS has a property for controlling the alignment of caption elements inside of a table? Neither did we! But now that we do, we've added utilities for it.
357+
358+
Use `caption-top` to position a caption element at the top of a table, and `caption-bottom` to position it at the bottom.
359+
360+
<Example p="none">
361+
<div class="shadow-sm overflow-hidden px-4 py-8 sm:px-8">
362+
<table class="border-collapse table-auto w-full text-sm">
363+
<caption class="text-slate-500 dark:text-slate-400 pt-4 text-xs caption-bottom">
364+
Table 3.1: Professional wrestlers and their signature moves.
365+
</caption>
366+
<thead>
367+
<tr>
368+
<th class="border dark:border-slate-600 font-medium p-4 pl-8 pt-3 pb-3 text-slate-400 dark:text-slate-200 text-left">Wrestler</th>
369+
<th class="border dark:border-slate-600 font-medium p-4 pr-8 pt-3 pb-3 text-slate-400 dark:text-slate-200 text-left">Signature Move(s)</th>
370+
</tr>
371+
</thead>
372+
<tbody class="bg-white dark:bg-slate-800">
373+
<tr>
374+
<td class="border border-slate-200 dark:border-slate-600 p-4 pl-8 text-slate-500 dark:text-slate-400">"Stone Cold" Steve Austin</td>
375+
<td class="border border-slate-200 dark:border-slate-600 p-4 pr-8 text-slate-500 dark:text-slate-400">Stone Cold Stunner, Lou Thesz Press</td>
376+
</tr>
377+
<tr>
378+
<td class="border border-slate-200 dark:border-slate-600 p-4 pl-8 text-slate-500 dark:text-slate-400">Bret "The Hitman" Hart</td>
379+
<td class="border border-slate-200 dark:border-slate-600 p-4 pr-8 text-slate-500 dark:text-slate-400">The Sharpshooter</td>
380+
</tr>
381+
<tr>
382+
<td class="border border-slate-200 dark:border-slate-600 p-4 pl-8 text-slate-500 dark:text-slate-400">Razor Ramon</td>
383+
<td class="border border-slate-200 dark:border-slate-600 p-4 pr-8 text-slate-500 dark:text-slate-400">Razor's Edge, Fallaway Slam</td>
384+
</tr>
385+
</tbody>
386+
</table>
387+
</div>
388+
</Example>
389+
390+
```html
391+
<table>
392+
<caption class="**caption-bottom**">
393+
Table 3.1: Professional wrestlers and their signature moves.
394+
</caption>
395+
<thead>
396+
<tr>
397+
<th>Wrestler</th>
398+
<th>Signature Move(s)</th>
399+
</tr>
400+
</thead>
401+
<tbody>
402+
<tr>
403+
<td>"Stone Cold" Steve Austin</td>
404+
<td>Stone Cold Stunner, Lou Thesz Press</td>
405+
</tr>
406+
<tr>
407+
<td>Bret "The Hitman" Hart</td>
408+
<td >The Sharpshooter</td>
409+
</tr>
410+
<tr>
411+
<td>Razor Ramon</td>
412+
<td>Razor's Edge, Fallaway Slam</td>
413+
</tr>
414+
</tbody>
415+
</table>
416+
```

0 commit comments

Comments
 (0)